-
Notifications
You must be signed in to change notification settings - Fork 17
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
Include Python development headers #530
Comments
@Jackenmen thanks for reporting this. I agree it's an issue. Thank you for provide a clear, simple reproduction. I was able to reproduce the issue quickly. I'll prioritize this for us to fix, and keep you updated with our progress. For maintainers' reference, the header files are present on the resultant image, so the pre-compiled CPython dependency is probably fine. It's more likely that we need to set/append an environment variable to point to the correct location (as suggested above).
Also for reference, this is the run-time environment using the same app image as above. It might be slightly different from the build-time environment, but should be a useful starting-off point.
|
Btw this is likely due to pypa/setuptools#3657 which was a setuptools regression in header autodetection, which first appeared in setuptools 65.2.0 and was fixed in setuptools 67.2.0. (Though I haven't tested the Paketo Python CNB to confirm.) The Heroku Python CNB currently explicitly sets |
Describe the Enhancement
Currently, the buildpack does not contain Python development headers which makes it hard to install any Python packages implemented in C that don't provide wheels for the platform. One such package is
psycopg2
which purposefully doesn't provide source distribution to allow usage of system's own libraries on production systems.In order to see the problem, you can run these commands:
which results in an error about missing Python headers:
Possible Solution
Include development headers in appropriate environments (potential candidates:
CPATH
,CPPPATH
,PKG_CONFIG_PATH
,INCLUDE_PATH
) or symlink them into one of the default include directories (not sure that will work properly).Motivation
The lack of development headers makes it hard to install any Python packages implemented in C (C extensions) that don't provide wheels for the platform. One such package is
psycopg2
which purposefully doesn't provide source distribution to allow usage of system's own libraries on production systems.The text was updated successfully, but these errors were encountered: