.. function:: get_config_h_filename()
Return the path of :file:`pyconfig.h`.
+
+.. function:: get_makefile_filename()
+
+ Return the path of :file:`Makefile`.
return vars
-def _get_makefile_filename():
+def get_makefile_filename():
+ """Return the path of the Makefile."""
if _PYTHON_BUILD:
return os.path.join(_PROJECT_BASE, "Makefile")
return os.path.join(get_path('platstdlib'), "config", "Makefile")
+# Issue #22199: retain undocumented private name for compatibility
+_get_makefile_filename = get_makefile_filename
+
def _generate_posix_vars():
"""Generate the Python module containing build-time variables."""
import pprint
vars = {}
# load the installed Makefile:
- makefile = _get_makefile_filename()
+ makefile = get_makefile_filename()
try:
_parse_makefile(makefile, vars)
except IOError, e:
'posix_home', 'posix_prefix', 'posix_user')
self.assertEqual(get_scheme_names(), wanted)
+ @unittest.skipIf(sys.platform.startswith('win'),
+ 'Test is not Windows compatible')
+ def test_get_makefile_filename(self):
+ makefile = sysconfig.get_makefile_filename()
+ self.assertTrue(os.path.isfile(makefile), makefile)
+ # Issue 22199
+ self.assertEqual(sysconfig._get_makefile_filename(), makefile)
+
def test_symlink(self):
# Issue 7880
symlink = get_attribute(os, "symlink")