Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-41880: fix finding headers when cross compiling #22440

Closed
wants to merge 1 commit into from

Conversation

lopsided98
Copy link

@lopsided98 lopsided98 commented Sep 28, 2020

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.

https://bugs.python.org/issue41880

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.
@the-knights-who-say-ni
Copy link

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 Missing

Our records indicate the following people have not signed the CLA:

@lopsided98

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
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@lopsided98
Copy link
Author

Equivalent fix for adopted distutils in setuptools: pypa/setuptools#2569

@iritkatriel
Copy link
Member

Closing this PR following the closure of its b.p.o issue (https://bugs.python.org/issue41880)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants