Message77883
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 .'],
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! |
|
Date |
User |
Action |
Args |
2008-12-15 22:22:32 | andybuckley | set | recipients:
+ andybuckley |
2008-12-15 22:22:32 | andybuckley | set | messageid: <1229379752.29.0.666537313596.issue4672@psf.upfronthosting.co.za> |
2008-12-15 22:22:31 | andybuckley | link | issue4672 messages |
2008-12-15 22:22:30 | andybuckley | create | |
|