Packaging script for py2exe

Hey all!

It seems that I'm not the only one who ran into trouble trying to package the Skellington into an executable with py2exe. The main problem seemed to be with the way the Skellington loaded the lib directory, and it had trouble finding the required modules once packaged up.

So thanks to some help by many other people, I've been able to create a Python script that will package up your game.

Here is the setup script. Extract this zip file into your Skellington game's lib directory, then execute the script. Give it the name of the final EXE that you want to create, and then tell it if you want it to be a console or Windows app. It will take care of the rest, and place the results in the /dist directory, ready for you to rename, zip up, and upload to your favorite host.

It's still in the early alpha version, but I hope it's helpful to you, and the code is released into the public domain (there's not much to it).

This script worked for me, and allowed me to finally create an EXE package of my game, Slacker.

Please place any feedback or questions as comments here, or feel free to e-mail me at hanclinto at gmail dot com.



(log in to comment)


Oh yeah, Richard -- any comments as far as how you'd like people to handle creating executables for their games, and uploading them to the PyWeek website? Should they upload updated versions/packages of their games now, or wait until after the judging is over?
Uploads will be open again once the judging has finished.
Oh, and thanks for the EXE maker! :)
Okay, thanks for the clarification!

No problem at all for the EXE maker -- I was able to look at Hectic's source for Which Way is Up (he was one of the few to include a, and I learned from there how it helps if you package from directly within the lib directory.

I hope that the package script is useful to some other people, and that it's easy enough for them to use. We shall see. :)


Yes, the packaging from the lib dir might be what was foiling my attempts -- I couldn't seem to get the damn thing to include OpenGL :)

I'll try packaging tonight and see how I go.

Thank you for the Exe maker :) It was so easy to use.
Thanks for the feedback! So glad to hear it worked for you. :)

I thought that Richard's requirement of the Skellington was a fabulous idea for the competition, and it has made testing the large number of games so much easier. I hope that we continue to use Skellingtons in the future, and I hope to see it include py2exe and py2app setup scripts to make the packaging process easier (and perhaps something even automated similar to what I've got here, I don't know).