To use Pyrex, SWIG and the like on a Win2K I have followed this way:

http://jove.prohosting.com/iwave/ipython/pyMinGW.html

I already had MinGW 3.4.2, so I have decompressed the Python 2.4.2
sources, I have merged in the pyMinGW patch, and I have run the global
compilation with:

make -f python24.mak all

It has compiled most things, but not zlibmodule.c
It has stopped the compilation with:

c:\......\bin\dllwrap.exe: no export definition file provided.
Creating one, but that may not be what you want
make[1]: Leaving directory `/.../PyminGW/Python-2.4.2/MinGW'
make -f zlib.mak
make[1]: Entering directory `/.../PyminGW/Python-2.4.2/MinGW'
gcc.exe -c ../Modules/zlibmodule.c -o ../Modules/zlibmodule.o
-I"../Include" -I"../Pc" -I"../../../d
ist/zlib-1.2.3"  -Wall -s -DNDEBUG -D_USRDLL -O2
../Modules/zlibmodule.c:8:18: zlib.h: No such file or directory
../Modules/zlibmodule.c:66: error: syntax error before "z_stream"

... etc etc.

Anyway, probably 98% was compiled and this Python works, I have tried
the standard tests and most of them pass.
Then I have downloaded the pyMinGW Extensions V. 0.0.6.6, so zip and
other things now work.

The link to the Tcl-Tkinter extension doesn't work (the free site
hosting the file doesn't accept this file format anymore), so I cannot
use Tkinter.

I have decompressed SWIG and put it in a temporary Path.

I have then tried a basic SWIG example, (called example) coming from
this obsolete but probably still interesting page:
http://sebsauvage.net/python/mingw.html

But I have had problems durign the module creation:

C:\...\PyminGW\Python-2.4.2\MinGW>python setup.py build -cmingw32
running build
running build_ext
building 'example' extension
swigging example.i to example_wrap.c
C:\...\PyminGW\swigwin-1.3.28\swig.exe -python -o example_wrap.c
example.i
creating build
creating build\temp.win32-2.4
creating build\temp.win32-2.4\Release
C:\......\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Ic:\python24\include
-Ic:\pytho
n24\PC -c example_wrap.c -o build\temp.win32-2.4\Release\example_wrap.o
example_wrap.c: In function `My_variable_set':
example_wrap.c:2550: error: `My_variable' undeclared (first use in this
function)

... ecc.


So I have had 3 problems, maybe some of you can suggest me how to solve
some of them.

(Can the standard Python site accept to distribuite an installer with
MinGW-compiled Python + minGW + SWIG for people using Windows that want
such system prebuilt? Maybe me or another person can assemble it).

Thank you,
bearophile

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to