Return the path of the Makefile.
()
| 313 | |
| 314 | |
| 315 | def 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 | |
| 336 | def _import_from_directory(path, name): |
no test coverage detected
searching dependent graphs…