Hi all!
I managed to compile wxPython 2.5.1.5 on Windows XP with USE_SWIG=0. I
have problems with running activex samples, but I will leave this for
later.
I downloaded SWIG 1.3.20 and applied three patches:
swig.python-docstring.patch
swig.xmlout.patch
swig.python-prepend.patch
I compiled swig and have swig.exe.
Now when I try to install wxPython 2.5.1.5 with USE_SWIG=1, I get the
following
C:\python-workspace>python setup.py install FINAL=1 USE_SWIG=1
Preparing CORE...
swig -c++ -Wall -nodefault -python -keyword -new_repr -modern -I./src
-D__WXMSW__ -noruntime -DBUILDING_RENAMERS -xmlout
c:\docume~1\hh~1\locals~1\temp\tmpbic7x3.xml -Isrc -o
src\msw\gdi_wrap.cpp src\gdi.i
src\my_typemaps.i:298: Syntax error in input.
Traceback (most recent call last):
File "setup.py", line 146, in ?
USE_SWIG, swig_force, swig_args, swig_deps +
File "C:\python-workspace\config.py", line 320, in run_swig
spawn(cmd)
File "C:\python-workspace\distutils\spawn.py", line 39, in spawn
_spawn_nt(cmd, search_path, dry_run=dry_run)
File "C:\python-workspace\distutils\spawn.py", line 87, in _spawn_nt
raise DistutilsExecError, \
distutils.errors.DistutilsExecError: command 'swig' failed with exit
status 1
Looking at my_typemaps.i line 298:
%fragment("SWIG_AsUnsignedLong","header", fragment="SWIG_AsLong") %{
SWIGSTATICINLINE(unsigned long)
SWIG_AsUnsignedLong(PyObject * obj)
{
if (PyLong_Check(obj)) {
return PyLong_AsUnsignedLong(obj);
} else {
long i = SWIG_AsLong(obj);
if ( !PyErr_Occurred() && (i < 0)) {
PyErr_SetString(PyExc_TypeError, "negative value received for
unsigned type");
}
return i;
}
}
%}
I don't see any error. Of course, the error could have been introduced
earlier in the file.
Any idea what is going wrong?
Thanks,
Hatim