Barry A. Warsaw <ba...@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_config_h_filename()
'/usr/local/include/python3.2/config-32m/pyconfig.h'
>>> sysconfig.get_makefile_filename() # see bug 9877
'/usr/local/lib/python3.2/config-32m/Makefile'

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 <rep...@bugs.python.org>
<http://bugs.python.org/issue9807>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to