New submission from Andy Buckley <a...@insectnation.org>: 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++', '-...@hepmcincpath@', '-outdir .'], include_dirs=['@HEPMCINCPATH@'], library_dirs=['@HEPMCLIBPATH@'], libraries=['HepMC'])], [...] 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: http://osdir.com/ml/python.distutils.devel/2006-06/msg00009.html but no useful reply was ever forthcoming ;( Maybe this time will be luckier! ---------- components: Distutils messages: 77883 nosy: andybuckley severity: normal status: open title: Distutils SWIG support blocks use of SWIG -outdir option type: behavior versions: Python 2.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4672> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com