[Python-checkins] distutils2: Make sysconfig.get_makefile_filename public (#9877)

tarek.ziade python-checkins at python.org
Sat Nov 6 22:56:14 CET 2010


tarek.ziade pushed 4ef3e9e41c10 to distutils2:

http://hg.python.org/distutils2/rev/4ef3e9e41c10
changeset:   795:4ef3e9e41c10
user:        ?ric Araujo <merwok at netwok.org>
date:        Fri Oct 22 01:11:37 2010 +0200
summary:     Make sysconfig.get_makefile_filename public (#9877)
files:       distutils2/_backport/sysconfig.py, distutils2/_backport/tests/test_sysconfig.py

diff --git a/distutils2/_backport/sysconfig.py b/distutils2/_backport/sysconfig.py
--- a/distutils2/_backport/sysconfig.py
+++ b/distutils2/_backport/sysconfig.py
@@ -266,7 +266,7 @@
     return vars
 
 
-def _get_makefile_filename():
+def get_makefile_filename():
     if _PYTHON_BUILD:
         return os.path.join(_PROJECT_BASE, "Makefile")
     return os.path.join(get_path('stdlib'), "config", "Makefile")
@@ -275,7 +275,7 @@
 def _init_posix(vars):
     """Initialize the module as appropriate for POSIX systems."""
     # load the installed Makefile:
-    makefile = _get_makefile_filename()
+    makefile = get_makefile_filename()
     try:
         _parse_makefile(makefile, vars)
     except IOError, e:
diff --git a/distutils2/_backport/tests/test_sysconfig.py b/distutils2/_backport/tests/test_sysconfig.py
--- a/distutils2/_backport/tests/test_sysconfig.py
+++ b/distutils2/_backport/tests/test_sysconfig.py
@@ -230,6 +230,10 @@
         config_h = sysconfig.get_config_h_filename()
         self.assertTrue(os.path.isfile(config_h), config_h)
 
+    def test_get_makefile_filename(self):
+        makefile = sysconfig.get_makefile_filename()
+        self.assertTrue(os.path.isfile(makefile), makefile)
+
     def test_get_scheme_names(self):
         wanted = ('nt', 'nt_user', 'os2', 'os2_home', 'osx_framework_user',
                   'posix_home', 'posix_prefix', 'posix_user')

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list