[C++-sig] Telling boost::build V2 how to find pyconfig.h?

Hans Meine meine at informatik.uni-hamburg.de
Fri May 11 12:09:12 CEST 2007


Hi!

For several hours now I have been struggling with boost::build V2, trying to 
compile the 1.34.0 beta version.

Please, can anyone tell me how to tell the build system that in addition to 
the regular python include path (which is found correctly), a 
platform-specific include path that contains only pyconfig.h is needed?

Looking at boost_1_34_0/tools/build/v2/tools/python.jam, I am not getting any 
smarter.  I do not even understand how the include path is set and why it is 
correct (I see the "rule" compute-default-paths, but my python installation 
is not in $prefix at all, so that cannot apply for me).  I expect 
distutils.sysconfig to be used, but I did not find that code yet.

With older boost versions, I simply set
PYTHON_PYCONFIG="`python -c "import distutils.sysconfig; print 
distutils.sysconfig.get_config_h_filename()"`"
and copied $PYTHON_PYCONFIG into $BUILDDIR/bin/boost/libs/python/build

I would be content if I found a comparable working hack to build 1.34.0 in our 
system environment, but the only location where I could copy pyconfig.h was 
the boost's source root directory, which is included through -I"."

If you tell me how to add an additional -I commandline argument to gcc, that 
would be fine, too.

Otherwise, the preferred solution would be to ask $(interpreter-cmd) for the 
location of pyconfig.h (see above) and compare the directory with the python 
includes directory, so it works for all users automatically.

-- 
Ciao, /  /
     /--/
    /  / ANS



More information about the Cplusplus-sig mailing list