Skip to content
Snippets Groups Projects
Commit bcc3ba09 authored by Alan Grosskurth's avatar Alan Grosskurth
Browse files

Make vendored libraries available at compile time (fixes #57)

When building, BUILD_DIR is set to a temporary directory. Vendored
libraries (e.g., pylibmc) are downloaded and unpacked in
$BUILD_DIR/.heroku/vendor/lib, but this is not currently in
LIBRARY_PATH or LD_LIBRARY_PATH.

Fix this by doing the following:

* Add $BUILD_DIR/.heroku/vendor/lib to LIBRARY_PATH/LD_LIBRARY_PATH

* Add $BUILD_DIR/.heroku/vendor/include to
  C_INCLUDE_PATH/CPLUS_INCLUDE_PATH

* Add $BUILD_DIR/.heroku/vendor/bin to PATH, so vendored commands can
  be used at compile time (e.g., curl-config)

* Add $BUILD_DIR/.heroku/vendor/lib/pkg-config to PKG_CONFIG_PATH, so
  vendored packages can be found with pkg-config
parent 31e65dc5
No related branches found
No related tags found
No related merge requests found
...@@ -79,11 +79,14 @@ ORIG_BUILD_DIR=$BUILD_DIR ...@@ -79,11 +79,14 @@ ORIG_BUILD_DIR=$BUILD_DIR
BUILD_DIR=$APP_DIR BUILD_DIR=$APP_DIR
# Prepend proper path buildpack use. # Prepend proper path buildpack use.
export PATH=$BUILD_DIR/.heroku/python/bin:$PATH export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
export LIBRARY_PATH=/app/.heroku/vendor/lib export C_INCLUDE_PATH=/app/.heroku/vendor/include:$BUILD_DIR/.heroku/vendor/include
export LD_LIBRARY_PATH=/app/.heroku/vendor/lib export CPLUS_INCLUDE_PATH=/app/.heroku/vendor/include:$BUILD_DIR/.heroku/vendor/include
export LIBRARY_PATH=/app/.heroku/vendor/lib:$BUILD_DIR/.heroku/vendor/lib
export LD_LIBRARY_PATH=/app/.heroku/vendor/lib:$BUILD_DIR/.heroku/vendor/lib
export PKG_CONFIG_PATH=/app/.heroku/vendor/lib/pkg-config:$BUILD_DIR/.heroku/vendor/lib/pkg-config
# Switch to the repo's context. # Switch to the repo's context.
cd $BUILD_DIR cd $BUILD_DIR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment