[issue9807] deriving configuration information for different builds with the same prefix
Barry A. Warsaw
report at bugs.python.org
Thu Sep 16 20:03:22 CEST 2010
Barry A. Warsaw <barry at python.org> added the comment:
I was thinking along the lines that RDM outlined, IOW that _sysconfig.c or equivalent would be autogenerated at build time. But I think there are really two issues here:
1) Avoiding parsing of pyconfig.h and Makefile to get variable values for the sysconfig module. This is fairly easy, but also the less important one I think. If we still want to do this, let's move it to a separate bug.
2) Allowing for pyconfig.h and Makefile for different build options to coexist. You need this so that extensions will be built against the correct build parameters. This is much more important and I think the issue that Doko really wants to solve. The _d hack now used is only a partial solution because it doesn't take into account other build options.
One possibility would be to use $SO, $SOABI, or just the flags in the latter (if you don't want the 'cpython-32' redundancy in the name) in the filename to pyconfig.h and Makefile. e.g.
>>> import sysconfig
>>> sysconfig.get_makefile_filename() # see bug 9877
The related issue is the naming of the binaries to include the build flag. Right now on Ubuntu we have python3-dbg for example. Maybe instead we want python3-<SOABI-FLAGS> e.g. python3-m, python3-dm etc. We can of course always use symlinks to get the old, or default names.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list