[PythonCE] pygame / distutils

Christopher Fairbairn christopher at christec.co.nz
Sat Jul 26 06:58:05 CEST 2008


Hi,

On Sat 26/07/08 05:13 , "Adam Walley" adam.walley at gmail.com sent:
> - is there already a way to get distutils working with PythonCE?

There has been recent discussions about this, but at current I don't bieleve there is anything available.

With respect to SDL and pygame it should be fairly easy to get the various python modules compiled. There have been a couple of 
releases built for PythonCE in the past and I've personally compiled from source a couple of times.

The SDL project has an additional ZIP file that contains Windows CE (Pocket PC) compatible project files that will allow you to 
build a suitable dll.

If you look at the distutils based installation files for the pygame distribution you can determine which source files need to be 
compiled into the various python modules (*.pyd). What I did was then manually create project files for Visual Studio to build 
these DLLs (you will need a source release of PythonCE itself for this, as to build a module you will require the python header 
files).

Once I had all the pygame dlls compiled it was then simply a matter of copying them to the correct folder on the PDA. There was no 
registry settings etc involved.

One thing to keep in mind is that some of the sample apps within the Pygame distribution won't work on a PDA without minor 
modifications. For example they commonly request a window size which is larger than the PDA's screen, and don't account for the 
lack of current working directory support when specifying file names for bitmap resources etc.

Hope this helps,
Christopher Fairbairn



More information about the PythonCE mailing list