I am trying to install M2Crypto on Heroku. It depends on the installation of SWIG.
I created a custom compiled swig
executable and custom buildpack .
Then I git push
my code to Heroku, the custom buildpack installs SWIG, then tries to install M2Crypto, but fails because it cannot find swig
.
This is the buildpack setup:
# Install SWIG if [ ! -d $CACHE_DIR/swig ]; then cd $BUILD_DIR echo "-----> Fetching and installing SWIG 2" curl -O https://s3.amazonaws.com/guybowden/swig.tar.gz >/dev/null 2>&1 echo "-----> Installing ..." tar xzvf swig.tar.gz >/dev/null 2>&1 mv swig $CACHE_DIR/swig rm swig.tar.gz echo "SWIG installed" | indent fi mkdir -p .paybox cp -R $CACHE_DIR/swig .paybox echo "updating path..." | indent PATH=$PATH:/app/.paybox/swig/bin/ export PATH echo $PATH | indent echo "setting SWIG_LIB environment var" export SWIG_LIB=/app/.paybox/swig/share/swig/2.0.5/
This happens before any pip install
commands are executed.
If I heroku run bash
and then manually run source .heroku/venv/bin/activate && pip install M2Crypto
, it will not install any problems and my application runs inside the bash prompt for the lifetime of this instance.
I think there is a problem with setting up PATH when starting the initial pip install -r requirements
... any ideas?
source share