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:
git clone https://github.com/paketo-buildpacks/samples
cd samples/python/pip
echo "psycopg2==2.9.5" >> requirements.txt
pack build pip-sample --buildpack paketo-buildpacks/python --builder paketobuildpacks/builder:full
which results in an error about missing Python headers:
./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
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.
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
psycopg2which 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
psycopg2which purposefully doesn't provide source distribution to allow usage of system's own libraries on production systems.