Re: [pygame] Distributing a Pygame game on Linux

2013-05-12 Thread Kevin Locoh
Oh sorry, I'd completely missed your message. Actually, it works on my 
computer with Ubuntu, but I had understood that cx_Freeze doesn't include 
every C extension library, in my case the SDL, which makes the tarball 
quite dependent of the distro: the game frozen with cx_Freeze would 
probably crash with a "module not found" message on another platform. Am I 
mistaken anywhere? I somehow hope so, it'd much easier for me to keep 
cx_Freeze which already works with Python 3.

Kevin

Le lundi 13 mai 2013 00:21:26 UTC+2, Thomas Kluyver a écrit :
>
> On 12 May 2013 19:24, Kevin Locoh >wrote:
>
>> I've been wondering how to best distribute a game made with Pygame on 
>> Linux. On Windows, cx_Freeze works very well, and I assume it would be just 
>> the same on Mac OS. But on Linux, it's perfectly useless because of the 
>> various distros I'd have to build the game for.
>
>
> I'm a contributor to cx_Freeze, and I'm curious why it doesn't work for 
> you. You should be able to create a tarball that includes all of the 
> required libraries. Distros prefer all the dependencies packaged 
> separately, but if you want to distribute it yourself, making one big 
> package should work.
>
> cx_Freeze does roughly the same job as PyInstaller, but it's compatible 
> with Python 3 (and PyInstaller isn't, last time I checked).
>
> Thomas
>  


Re: [pygame] Distributing a Pygame game on Linux

2013-05-12 Thread Kevin Locoh
Thanks for your suggestions, PyInstaller seems to be perfect! But I'll have 
to wait a bit: it doesn't support Python 3 yet. I'll distribute the sources 
until then, I guess.

Le dimanche 12 mai 2013 22:43:31 UTC+2, Sam Bull a écrit :
>
> On Sun, 2013-05-12 at 19:41 +0100, Bartosz Debski wrote: 
> > Try pyinstaller. Works for me in setup where i build binaries on 
> > Slackware and distribute to tar packages. So far i had no complains on 
> > other distros. 
>
>
> I'd also recommend Pyinstaller, should work for Windows and OS X as 
> well, so you only need one way to create a frozen binary. 
>
> This'll make an executable with no dependencies you can share in a 
> tarball. If you want to make it easy to install, you will probably want 
> to look at DEB/RPM packaging as well, though a future version of 
> Pyinstaller may do that for you as well. 
>


Re: [pygame] Distributing a Pygame game on Linux

2013-05-12 Thread Thomas Kluyver
On 12 May 2013 19:24, Kevin Locoh  wrote:

> I've been wondering how to best distribute a game made with Pygame on
> Linux. On Windows, cx_Freeze works very well, and I assume it would be just
> the same on Mac OS. But on Linux, it's perfectly useless because of the
> various distros I'd have to build the game for.


I'm a contributor to cx_Freeze, and I'm curious why it doesn't work for
you. You should be able to create a tarball that includes all of the
required libraries. Distros prefer all the dependencies packaged
separately, but if you want to distribute it yourself, making one big
package should work.

cx_Freeze does roughly the same job as PyInstaller, but it's compatible
with Python 3 (and PyInstaller isn't, last time I checked).

Thomas


Re: [pygame] Distributing a Pygame game on Linux

2013-05-12 Thread Sam Bull
On Sun, 2013-05-12 at 19:41 +0100, Bartosz Debski wrote:
> Try pyinstaller. Works for me in setup where i build binaries on
> Slackware and distribute to tar packages. So far i had no complains on
> other distros.


I'd also recommend Pyinstaller, should work for Windows and OS X as
well, so you only need one way to create a frozen binary.

This'll make an executable with no dependencies you can share in a
tarball. If you want to make it easy to install, you will probably want
to look at DEB/RPM packaging as well, though a future version of
Pyinstaller may do that for you as well.


signature.asc
Description: This is a digitally signed message part


Re: [pygame] Distributing a Pygame game on Linux

2013-05-12 Thread Bartosz Debski
Hi,

Try pyinstaller. Works for me in setup where i build binaries on Slackware
and distribute to tar packages. So far i had no complains on other distros.

Hope it helps.
Bart
 On May 12, 2013 7:24 PM, "Kevin Locoh"  wrote:

> Hi all,
>
> I've been wondering how to best distribute a game made with Pygame on
> Linux. On Windows, cx_Freeze works very well, and I assume it would be just
> the same on Mac OS. But on Linux, it's perfectly useless because of the
> various distros I'd have to build the game for. I could ship a tarball with
> the sources, but still, it's quite difficult for the users to deal with so
> many dependencies (Pygame, and hence the SDL, Numpy sometimes…). In my
> case, I can't even relie on the repos and tell the players to install a few
> packages with Aptitude: I use Python 3 and a pre-release of Pygame 1.9.2
> (so as to use Surfarray, not available for Python 3 with Pygame 1.9.1), and
> these versions aren't even in the repos. So, what's the best way to
> distribute a game for Linux?
>
> I've thought of a few possibilites I could try:
>
>- Making some generic DEB and RPM packages, and hope they can cover
>most distributions. I don't know whether a RPM built on Ubuntu will work on
>Fedora though…
>- Using Setuptools/Distribute and Python eggs. From what I've read, it
>is quite powerful. Provided the Setuptools script point to the Pygame
>Mercurial repo and to any other required dependency, it will build them
>from the sources on its own. The only limit is the SDL. It doesn't seem
>that Setuptools can install a C library, so the user will have to install
>it by himself. But that seems more reasonable already, the SDL 1.2 being
>widely available on most distros. Or I could add the SDL to the sources and
>tweak the setup script so that it builds it if needed. In this way, I would
>have a completely standalone game, with the same sources regardless of the
>distribution. Has anyone tried his hand at it? I'd love to hear some
>feedback.
>
> Thanks in advance for your help!
> Kevin
>
>


[pygame] Distributing a Pygame game on Linux

2013-05-12 Thread Kevin Locoh
Hi all,

I've been wondering how to best distribute a game made with Pygame on 
Linux. On Windows, cx_Freeze works very well, and I assume it would be just 
the same on Mac OS. But on Linux, it's perfectly useless because of the 
various distros I'd have to build the game for. I could ship a tarball with 
the sources, but still, it's quite difficult for the users to deal with so 
many dependencies (Pygame, and hence the SDL, Numpy sometimes…). In my 
case, I can't even relie on the repos and tell the players to install a few 
packages with Aptitude: I use Python 3 and a pre-release of Pygame 1.9.2 
(so as to use Surfarray, not available for Python 3 with Pygame 1.9.1), and 
these versions aren't even in the repos. So, what's the best way to 
distribute a game for Linux?

I've thought of a few possibilites I could try:

   - Making some generic DEB and RPM packages, and hope they can cover most 
   distributions. I don't know whether a RPM built on Ubuntu will work on 
   Fedora though…
   - Using Setuptools/Distribute and Python eggs. From what I've read, it 
   is quite powerful. Provided the Setuptools script point to the Pygame 
   Mercurial repo and to any other required dependency, it will build them 
   from the sources on its own. The only limit is the SDL. It doesn't seem 
   that Setuptools can install a C library, so the user will have to install 
   it by himself. But that seems more reasonable already, the SDL 1.2 being 
   widely available on most distros. Or I could add the SDL to the sources and 
   tweak the setup script so that it builds it if needed. In this way, I would 
   have a completely standalone game, with the same sources regardless of the 
   distribution. Has anyone tried his hand at it? I'd love to hear some 
   feedback.

Thanks in advance for your help!
Kevin