Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fea2d04

Browse files
committed
Fix distutils.sysconfig.get_makefile_filename when prefix != exec-prefix
1 parent de50455 commit fea2d04

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/distutils/sysconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def get_makefile_filename():
218218
"""Return full pathname of installed Makefile from the Python build."""
219219
if python_build:
220220
return os.path.join(os.path.dirname(sys.executable), "Makefile")
221-
lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
221+
lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
222222
config_file = 'config-{}{}'.format(get_python_version(), build_flags)
223223
return os.path.join(lib_dir, config_file, 'Makefile')
224224

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ Core and Builtins
4343
Library
4444
-------
4545

46+
- Fix distutils.sysconfig.get_makefile_filename when Python was configured with
47+
different prefix and exec-prefix.
48+
4649
- Issue #11254: Teach distutils to compile .pyc and .pyo files in
4750
PEP 3147-compliant __pycache__ directories.
4851

0 commit comments

Comments
 (0)