Return the path of the Makefile.
()
| 324 | |
| 325 | |
| 326 | def get_makefile_filename(): |
| 327 | """Return the path of the Makefile.""" |
| 328 | |
| 329 | # GH-127429: When cross-compiling, use the Makefile from the target, instead of the host Python. |
| 330 | if cross_base := os.environ.get('_PYTHON_PROJECT_BASE'): |
| 331 | return os.path.join(cross_base, 'Makefile') |
| 332 | |
| 333 | if _PYTHON_BUILD: |
| 334 | return os.path.join(_PROJECT_BASE, "Makefile") |
| 335 | |
| 336 | if hasattr(sys, 'abiflags'): |
| 337 | config_dir_name = f'config-{_PY_VERSION_SHORT}{sys.abiflags}' |
| 338 | else: |
| 339 | config_dir_name = 'config' |
| 340 | |
| 341 | if hasattr(sys.implementation, '_multiarch'): |
| 342 | config_dir_name += f'-{sys.implementation._multiarch}' |
| 343 | |
| 344 | return os.path.join(get_path('stdlib'), config_dir_name, 'Makefile') |
| 345 | |
| 346 | |
| 347 | def _import_from_directory(path, name): |
no test coverage detected