MCPcopy Index your code
hub / github.com/python/cpython / get_makefile_filename

Function get_makefile_filename

Lib/sysconfig/__init__.py:315–333  ·  view source on GitHub ↗

Return the path of the Makefile.

()

Source from the content-addressed store, hash-verified

313
314
315def get_makefile_filename():
316 """Return the path of the Makefile."""
317
318 # GH-127429: When cross-compiling, use the Makefile from the target, instead of the host Python.
319 if cross_base := os.environ.get('_PYTHON_PROJECT_BASE'):
320 return os.path.join(cross_base, 'Makefile')
321
322 if _PYTHON_BUILD:
323 return os.path.join(_PROJECT_BASE, "Makefile")
324
325 if hasattr(sys, 'abiflags'):
326 config_dir_name = f'config-{_PY_VERSION_SHORT}{sys.abiflags}'
327 else:
328 config_dir_name = 'config'
329
330 if hasattr(sys.implementation, '_multiarch'):
331 config_dir_name += f'-{sys.implementation._multiarch}'
332
333 return os.path.join(get_path('stdlib'), config_dir_name, 'Makefile')
334
335
336def _import_from_directory(path, name):

Callers 2

_generate_posix_varsFunction · 0.90
_init_config_varsFunction · 0.85

Calls 3

get_pathFunction · 0.85
getMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…