On 10/06/2011 05:08 PM, David Aldrich wrote:

You can also extract this information from various methods in the distutils
package.  Even if you aren't using distutils to control the build, you could ask
Python itself to print out the configuration variables.  For instance:

python -c "import distutils.sysconfig; print
distutils.sysconfig.get_python_inc()"

That should give you the Python include directory.  There are other methods
to get library names, compiler flags, and other things.
Hi Jim

That is very useful. Thank you.

How could I get the major version number (e.g. 2.4) so that I can build the 
library type:

     EXTRA_LIBS_R+=-lpython2.4

sys.version_info


_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to