
Hi,
I am trying to use disutils's features with 'SWIG'... but hit a rather strange problem.
To reproduce it:
setup.py ------------------------------------------------------ from distutils.core import setup, Extension
e = Extension("_foo", sources = ["foo.i", ], swig_opts = ["-outdir .", ])
setup(name="foo", ext_modules=[e, ]) -------------------------------------------------------
building fails like:
python setup.py build
running build running build_ext building '_foo' extension swigging foo.i to foo_wrap.c swig -python -outdir . -o foo_wrap.c foo.i swig error : Unrecognized option -outdir . Use 'swig -help' for available options. error: command 'swig' failed with exit status 1
but a copy/paste of the swig command shows that '-outdir' *is* recognised...
swig -python -outdir . -o foo_wrap.c foo.i
Unable to find file 'foo.i'.
Are the permitted options for SWIG hardcoded in 'distutils' ?
RiMa

Well, well... after some time crawling after information on distutils, SWIG, and C++, it seems that disutils has some problems with the combo SWIG/C++ (and bug/patches found across found on mailing list never included in distutils :/ ).
So setuptools seems more alive, and I gave it a go: Same example as below, replacing
from distutils.core import setup, Extension
by
from setuptools import setup, Extension
.
No luck. Same results.
Anyone with an idea ?
--thanks.
2006/6/7, Risky Martin risky.martin@gmail.com:
Hi,
I am trying to use disutils's features with 'SWIG'... but hit a rather strange problem.
To reproduce it:
setup.py
from distutils.core import setup, Extension
e = Extension("_foo", sources = ["foo.i", ], swig_opts = ["-outdir .", ])
setup(name="foo", ext_modules=[e, ])
building fails like:
python setup.py build
running build running build_ext building '_foo' extension swigging foo.i to foo_wrap.c swig -python -outdir . -o foo_wrap.c foo.i swig error : Unrecognized option -outdir . Use 'swig -help' for available options. error: command 'swig' failed with exit status 1
but a copy/paste of the swig command shows that '-outdir' *is* recognised...
swig -python -outdir . -o foo_wrap.c foo.i
Unable to find file 'foo.i'.
Are the permitted options for SWIG hardcoded in 'distutils' ?
RiMa
participants (1)
-
Risky Martin