Re: packaging the game, also, what does setup.py do?

167 views
Skip to first unread message

Winston Wolff

unread,
Mar 26, 2013, 5:13:47 PM3/26/13
to pyglet...@googlegroups.com
I believe the source for pyglet is python 2, and setup.py converts it to python 3 on installation.

Regarding an EXE, I used py2exe a long time ago, but using python 2.7 not 3.3. Let us know if you find it to work.

-ww

On Mar 26, 2013, at 1:44 PM, Joseph Clark <joecl...@gmail.com> wrote:

> I'm using pyglet 1.2alpha1 with Python 3.3 and have got it up and working on a Windows machine. So far, I have had pyglet "installed" in the Python directories (under C:\Python33) and it worked fine.
>
> I decided that I want to include pyglet with the game I'm developing, so that users don't have to install it on their own machines. First I tried simply dragging the original pyglet folder from the ZIP file into my game's package and importing it. This failed because the code had a lot of Python 2 syntax and some other idiosyncrasies. Then I copied the code from the "build" folder in the "installed" pyglet, and it worked smoothly. So... I'm puzzled as to what the "installation" process does. Did it convert the code to Python 3? That's cool I guess. I'd like to understand this better though: is it now safe to distribute an application including the "installed" pyglet directory so that users can use it? Or did the setup script do some customizing of pyglet to work with my personal computer that might render it non-portable?
>
> Finally, have any of you had luck packaging a pyglet game as an EXE file? How about in Python 3? Any advice about the best way to accomplish this?
>
> --
> You received this message because you are subscribed to the Google Groups "pyglet-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pyglet-users...@googlegroups.com.
> To post to this group, send email to pyglet...@googlegroups.com.
> Visit this group at http://groups.google.com/group/pyglet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Richard Jones

unread,
Mar 26, 2013, 7:24:46 PM3/26/13
to pyglet...@googlegroups.com
These days I would recommend looking into pyInstaller as it is cleaner
and easier to use (in my limited experience). No setup.py!

http://www.pyinstaller.org/

Also, have a look at the "skellington" that I created to help people
package their games for PyWeek. It doesn't create an executable but
should be able to with pyInstaller's help. You can grab its ZIP file
from http://pyweek.org/s/help/#what-to-submit-as-your-entry


Richard

Zim the Fox

unread,
Mar 31, 2013, 12:26:11 AM3/31/13
to pyglet...@googlegroups.com
What I've used to package Pyglet projects is cx_Freeze, which is the only freezing utility that works in Python 3 as far as I know. The problem is that when I've used I've had to manually include each Pyglet subdirectory, I'm probably just using it wrong :P
Reply all
Reply to author
Forward
0 new messages