]> granicus.if.org Git - python/commitdiff
Fix distutils.sysconfig.get_makefile_filename when prefix != exec-prefix
authorÉric Araujo <merwok@netwok.org>
Fri, 7 Oct 2011 23:56:52 +0000 (01:56 +0200)
committerÉric Araujo <merwok@netwok.org>
Fri, 7 Oct 2011 23:56:52 +0000 (01:56 +0200)
Lib/distutils/sysconfig.py
Misc/NEWS

index 5ea724c096020e2e2f0b446e91a9e4200f461ca9..ac06313b19cda2b30c2a1d34dd28cbfc3dc5b8b9 100644 (file)
@@ -218,7 +218,7 @@ def get_makefile_filename():
     """Return full pathname of installed Makefile from the Python build."""
     if python_build:
         return os.path.join(os.path.dirname(sys.executable), "Makefile")
-    lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
+    lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
     config_file = 'config-{}{}'.format(get_python_version(), build_flags)
     return os.path.join(lib_dir, config_file, 'Makefile')
 
index a55fcb3c24e30a4b1332f4656fdaa9cc7d5ecd93..dfbeb4d0298682efd6452a57e428d4020ebfcd9a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -43,6 +43,9 @@ Core and Builtins
 Library
 -------
 
+- Fix distutils.sysconfig.get_makefile_filename when Python was configured with
+  different prefix and exec-prefix.
+
 - Issue #11254: Teach distutils to compile .pyc and .pyo files in
   PEP 3147-compliant __pycache__ directories.