Hi,
On 23/03/2008, at 5:07 AM, Alexandre Delattre wrote:
> Btw, I have a suggestion to make compiling/porting C extension
> modules easier in future PythonCE builds:
>
> Indeed, the functions implemented in wince_compatibility.c are not
> available from a C extension module.
>
> Using the __declspec(dllexport) notation for these function would
> allow extensions to dynamically link with them, and benefit for
> instance of proper errno and current directory support.
While Joseph has been concentrating on getting a Python 2.6 merge up
and running I have been working on some related things to hopefully
make a future merge into the Python trunk more acceptable/easier.
One of them is essentially the changes you suggest above. With a few
additional modifications it helps reduce the number of #ifdef
MS_WINCE required through the core Python source code, and it makes
them not only available for extension modules but also other
supporting libraries such as libsdl etc.
I'm particularly keen to get the SDL graphics library compiled with
access to Python's concept of a current working directory etc, as
this will mean a lot of pygame based projects will run on PythonCE
without major changes. Using the existing pygame/libsdl ports
requires all file paths to be replaced with full paths to any graphic
or sound resources etc. My changes to how wince_compatibility.c works
means although libsdl will get access to Python's current working
directory concept etc, it still doesn't have a direct dependency on
PythonCE being installed (i.e. SDL still works without PythonCE
installed).
The other change I have been experimenting with is a replacement of
the SCONS based build system for PythonCE. The Win32 desktop versions
of Python are currently built via a series of Visual Studio 2008
project files. I have started writing a little script that converts
these project files so that they build for Pocket PC 2003 (in a
similar fashion to an existing script which converts the VS2008 files
into a format compatible with VS2005). My progress seems to be going
well.
My hope is that if we can start building using the same process as
the desktop it will be easier to get the changes submitted upstream.
Any changes the core Python developers make to how Python builds for
the desktop would instantly be reflected in the PythonCE build
process. This also helps resolve some of the differences that
currently occur between the desktop and PythonCE builds.
How many people are currently building PythonCE with Embedded Visual
C v4? One thing Joseph and myself have been thinking about is further
developing the work I have been doing to produce a script that would
convert the VS2008 based project files into a format compatible with
Embedded Visual C. This isn't of particular interest to me (as I have
been using Visual Studio to build PythonCE for quite a while), but I
do realise that unlike for the desktop there isn't a free version of
Visual Studio that is capable of developing PDA applications.
Hope this helps,
Christopher Fairbairn
___
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce