[Python-Dev] backporting the _sysconfigdata.py module to 2.7

Thomas Wouters thomas at python.org
Thu Mar 21 23:49:39 CET 2013

On Thu, Mar 21, 2013 at 10:48 PM, Benjamin Peterson <benjamin at python.org>wrote:

> 2013/3/21 Matthias Klose <doko at ubuntu.com>:
> > I'd like to backport issue13150, the _sysconfigdata.py module to 2.7. My
> > motivation is not the improved startup time, but the ability to
> cross-build
> > extension modules using distutils/setuptools.  The basic idea is to use
> the
> > python interpreter of the build machine (the machine you build on), and
> the
> > _sysconfigdata.py for the host machine (the machine you build for).
>  This kind
> > of setup works fine as long as the setup.py for a third party package
> gets all
> > build related information from the sysconfig.py module, and not directly
> from os
> > or sys (e.g. sys.platform).
> >
> > The patch for issue13150 doesn't change any API's, but only moves the
> > computation of the config vars from runtime to build time.  I'd like to
> avoid
> > backporting this to 3.2 as well, because the cross-build support is
> currently
> > only found in 2.7, 3.3 and the trunk.
> This is a fairly small non-userfacing change, so okay.

FWIW, we do the exact same thing in our (internal) Google Python 2.7 builds
(because we're forbidden from having files named 'Makefile' and '*.h' in
our production environment -- and also because of the startup time) and
while we've seen the most obscure, internal changes cause failures in the
most unexpected ways, we haven't seen anything broken or failing in any way
by that change. (Not that I was expecting it, I'm just saying even I think
this is a good idea ;)

Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130321/89a5dfc5/attachment.html>

More information about the Python-Dev mailing list