[Python-Dev] pyconfig.h and exec-prefix

David Abrahams dave@boost-consulting.com
24 Oct 2002 18:41:04 -0400


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: 2002年10月23日 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 
> ./configure
 --prefix=/afs/.slac.stanford.edu/package/python/common/2.0
 --exec-prefix=/afs/.slac.stanford.edu/package/python/sun4x_55/2.0
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

AltStyle によって変換されたページ (->オリジナル) /