bpo-41880: fix finding headers when cross compiling#22440
bpo-41880: fix finding headers when cross compiling#22440lopsided98 wants to merge 1 commit intopython:mainfrom
Conversation
When cross-compiling third-party extensions, get_python_inc() may be called to return the path to Python's headers. However, it uses the sys.prefix or sys.exec_prefix of the build Python, which returns incorrect paths when cross-compiling (paths pointing to build system headers). To fix this, we use the INCLUDEPY and CONFINCLUDEPY conf variables, which can be configured to point at host Python by setting _PYTHON_SYSCONFIGDATA_NAME. The existing behavior is maintained on non-POSIX platforms or if a prefix is manually specified.
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
|
Equivalent fix for adopted distutils in setuptools: pypa/setuptools#2569 |
|
Closing this PR following the closure of its b.p.o issue (https://bugs.python.org/issue41880) |
When cross-compiling third-party extensions,
get_python_inc()may be called toreturn the path to Python's headers. However, it uses the
sys.prefixorsys.exec_prefixof the build Python, which returns incorrect paths whencross-compiling (paths pointing to build system headers).
To fix this, we use the
INCLUDEPYandCONFINCLUDEPYconf variables, which canbe configured to point at host Python by setting
_PYTHON_SYSCONFIGDATA_NAME.The existing behavior is maintained on non-POSIX platforms or if a prefix is
manually specified.
https://bugs.python.org/issue41880