Author: Armin Rigo <[email protected]>
Branch:
Changeset: r64378:b5f6146ec902
Date: 2013-05-21 11:48 +0200
http://bitbucket.org/pypy/pypy/changeset/b5f6146ec902/
Log: Update these files to include not only "import *" in sysconfig, but
really import all the names, including the ones that start with
underscores. Might help with people that write in their setup.py
things like "sysconfig._init_posix" or other completely undocumented
hacks.
diff --git a/lib-python/2.7/distutils/sysconfig.py
b/lib-python/2.7/distutils/sysconfig.py
--- a/lib-python/2.7/distutils/sysconfig.py
+++ b/lib-python/2.7/distutils/sysconfig.py
@@ -1,30 +1,16 @@
-"""Provide access to Python's configuration information. The specific
-configuration variables available depend heavily on the platform and
-configuration. The values may be retrieved using
-get_config_var(name), and the list of variables is available via
-get_config_vars().keys(). Additional convenience functions are also
-available.
-
-Written by: Fred L. Drake, Jr.
-Email: <[email protected]>
-"""
-
-__revision__ = "$Id: sysconfig.py 85358 2010-10-10 09:54:59Z antoine.pitrou $"
-
-import sys
-
# The content of this file is redirected from
# sysconfig_cpython or sysconfig_pypy.
+# All underscore names are imported too, because
+# people like to use undocumented sysconfig._xxx
+# directly.
+import sys
if '__pypy__' in sys.builtin_module_names:
- from distutils.sysconfig_pypy import *
- from distutils.sysconfig_pypy import _config_vars # needed by setuptools
- from distutils.sysconfig_pypy import _variable_rx # read_setup_file()
+ from distutils import sysconfig_pypy as _sysconfig_module
else:
- from distutils.sysconfig_cpython import *
- from distutils.sysconfig_cpython import _config_vars # needed by setuptools
- from distutils.sysconfig_cpython import _variable_rx # read_setup_file()
+ from distutils import sysconfig_cpython as _sysconfig_module
+globals().update(_sysconfig_module.__dict__)
_USE_CLANG = None
diff --git a/lib-python/2.7/distutils/sysconfig_cpython.py
b/lib-python/2.7/distutils/sysconfig_cpython.py
--- a/lib-python/2.7/distutils/sysconfig_cpython.py
+++ b/lib-python/2.7/distutils/sysconfig_cpython.py
@@ -9,7 +9,7 @@
Email: <[email protected]>
"""
-__revision__ = "$Id$"
+__revision__ = "$Id: sysconfig.py 85358 2010-10-10 09:54:59Z antoine.pitrou $"
import os
import re
diff --git a/lib-python/2.7/distutils/sysconfig_pypy.py
b/lib-python/2.7/distutils/sysconfig_pypy.py
--- a/lib-python/2.7/distutils/sysconfig_pypy.py
+++ b/lib-python/2.7/distutils/sysconfig_pypy.py
@@ -1,6 +1,15 @@
-"""PyPy's minimal configuration information.
+"""Provide access to Python's configuration information.
+This is actually PyPy's minimal configuration information.
+
+The specific configuration variables available depend heavily on the
+platform and configuration. The values may be retrieved using
+get_config_var(name), and the list of variables is available via
+get_config_vars().keys(). Additional convenience functions are also
+available.
"""
+__revision__ = "$Id: sysconfig.py 85358 2010-10-10 09:54:59Z antoine.pitrou $"
+
import sys
import os
import imp
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit