
This issue came up on the c++-sig. I'm not qualified to answer any of the questions at the bottom, and hoped that this forum could be of some help. From: "Paul F. Kunz" <Paul_Kunz@SLAC.Stanford.EDU> Subject: Re: [C++-sig] Boost V1 build on Solaris To: c++-sig@python.org Date: Wed, 23 Oct 2002 17:36:58 -0700 Reply-To: c++-sig@python.org One final question, which is not specific to boost::python but general question on building Python modules. What my Solaris administrators have done is to configure Python with
They also did a build fron Linux with the appropriate `exec-prefix'. What apparently this has done is to put all but one of the Python include files in the directory `common/2.0/include'. But Python.h includes `config.h' or `pyconfig.h' (depending on the version) which gets installed in `sun4x_55/2.0/include'. This is appropriate since this file is machine/OS dependent. Now the problem is that boost::python, and other packages, gives you one variable, like PYTHON_INCLUDES, for its build. When it is set to find `Python.h' it will not find `pyconfig.h'. What is the best way to handle this situation? Is it a bug in Python's configure script? Bug in boost::python and others? Or am I missing something obvious? -- David Abrahams dave@boost-consulting.com * http://www.boost-consulting.com Building C/C++ Extensions for Python: Dec 9-11, Austin, TX http://www.enthought.com/training/building_extensions.html

>> Now the problem is that boost::python, and other packages, gives you >> one variable, like PYTHON_INCLUDES, for its build. When it is set to >> find `Python.h' it will not find `pyconfig.h'. Seems to me like boost::python needs to be able to point at both directories. Maybe PYTHON_INCLUDES could be a colon-separated list of directories which gets broken up into multiple -I<dir> flags. I suppose that sort of change is a bit late for v1? Skip

Skip Montanaro <skip@pobox.com> writes:
Considering that v2 was released a few weeks ago, that sounds about right ;-) -- David Abrahams dave@boost-consulting.com * http://www.boost-consulting.com Building C/C++ Extensions for Python: Dec 9-11, Austin, TX http://www.enthought.com/training/building_extensions.html

>> Seems to me like boost::python needs to be able to point at both >> directories. Maybe PYTHON_INCLUDES could be a colon-separated list >> of directories which gets broken up into multiple -I<dir> flags. I >> suppose that sort of change is a bit late for v1? David> Considering that v2 was released a few weeks ago, that sounds David> about right ;-) How about OTHER=<the other include directory make -n \ | sed -e "s/-I$PYTHON_INCLUDES/-I$PYTHON_INCLUDES -I$OTHER/" \ | sh -x ? Depending on how the boost::python directory tree is organized, it just might work. Skip

>> Now the problem is that boost::python, and other packages, gives you >> one variable, like PYTHON_INCLUDES, for its build. When it is set to >> find `Python.h' it will not find `pyconfig.h'. Seems to me like boost::python needs to be able to point at both directories. Maybe PYTHON_INCLUDES could be a colon-separated list of directories which gets broken up into multiple -I<dir> flags. I suppose that sort of change is a bit late for v1? Skip

Skip Montanaro <skip@pobox.com> writes:
Considering that v2 was released a few weeks ago, that sounds about right ;-) -- David Abrahams dave@boost-consulting.com * http://www.boost-consulting.com Building C/C++ Extensions for Python: Dec 9-11, Austin, TX http://www.enthought.com/training/building_extensions.html

>> Seems to me like boost::python needs to be able to point at both >> directories. Maybe PYTHON_INCLUDES could be a colon-separated list >> of directories which gets broken up into multiple -I<dir> flags. I >> suppose that sort of change is a bit late for v1? David> Considering that v2 was released a few weeks ago, that sounds David> about right ;-) How about OTHER=<the other include directory make -n \ | sed -e "s/-I$PYTHON_INCLUDES/-I$PYTHON_INCLUDES -I$OTHER/" \ | sh -x ? Depending on how the boost::python directory tree is organized, it just might work. Skip
participants (2)
-
David Abrahams
-
Skip Montanaro