This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andybuckley
Recipients andybuckley
Date 2008-12-15.22:22:29
SpamBayes Score 4.28437e-08
Marked as misclassified No
Message-id <>
When using distutils to build an extension module using SWIG, it makes
most sense to use the built-in SWIG support. However, the distutils seem
to "vet" the options passed via the Extension.swig_opts attr/arg:

ext_modules=[Extension('_hepmc', ['@top_srcdir@/hepmc.i'],
               swig_opts=['-c++', '-I@HEPMCINCPATH@', '-outdir .'],

results in this error:

building '_hepmc' extension
swigging ./hepmc.i to ./hepmc_wrap.cpp
swig -python -c++ -I/home/andy/heplocal/include -outdir . -o
./hepmc_wrap.cpp ./hepmc.i
swig error : Unrecognized option -outdir .
Use 'swig -help' for available options.
error: command 'swig' failed with exit status 1

but calling the same swig command works fine. It's the same copy of
swig, but it seems to be distutils rather than swig that is throwing the
error. This is particularly relevant since I need to use -outdir to meet
the autotools "distcheck" requirement of successfully building from a
build-dir separate from the source dir: code generation tools like SWIG
blur such a distinction and so need to support output location flags
like -outdir.

I see this was also noticed some time ago:
but no useful reply was ever forthcoming ;(  Maybe this time will be
Date User Action Args
2008-12-15 22:22:32andybuckleysetrecipients: + andybuckley
2008-12-15 22:22:32andybuckleysetmessageid: <>
2008-12-15 22:22:31andybuckleylinkissue4672 messages
2008-12-15 22:22:30andybuckleycreate