heroku/heroku-buildpack-python — pull request #103 by grosskur (2013-08-15 00:09:51+00:00)
Title: 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`