I'm creating a Python app in Heroku and I want to install a package that makes use of C extensions. If I just include that package in requirements.txt and run the app, it will give me the following error:
The compiled C library is not available
From that package's documentation, it states:
Depending on your system, this might not install the C version. To guarantee installation of the C extensions follow the instructions in the “From Source” section below.
So I suppose I need to install it in Heroku from source. In that section, it states I should download the source code and then run:
python3 setup.py build_ext --inplace
python3 setup.py install
python3 setup.py --noopenmp build_ext --inplace
I downloaded the package in my app's directory but then I'm not sure how to run the following commands in requirements.txt to install the dependencies properly.
I tried adding the following lines in requirements.txt but build took too long and in the end failed:
./packages/package --global-option=build_ext --install-option="--inplace"
./packages/package
./packages/package --global-option=build_ext --install-option="--noopenmp" --install-option="--inplace"