[Distutils] unrecognised swig options ?
Phillip J. Eby
pje at telecommunity.com
Thu Jun 29 21:45:49 CEST 2006
At 03:49 PM 6/10/2006 +0800, Risky Martin wrote:
>2006/6/7, Risky Martin <<mailto:risky.martin at gmail.com>
>risky.martin at gmail.com>:
>>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 you sure that you are running the same swig on the command line that
Python is running?
More information about the Distutils-SIG
mailing list