diff --git a/CHANGELOG.md b/CHANGELOG.md index a81a832c1c8722b0bc5a752523af4d599052c9e1..6db4c687abe8e5ca7a6acd6bc79c28c67ef015f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Python Buildpack Changelog +# Unreleased + +The libffi/libmemcached vendoring step is now skipped on Heroku-16 (since they are installed in the base image). + # 115 Revert a pull request. diff --git a/bin/steps/cryptography b/bin/steps/cryptography index 06afa5b9de5e75f80855988a309dfd9db744f529..95af456883279400e549bcddfcd42591591c49b1 100755 --- a/bin/steps/cryptography +++ b/bin/steps/cryptography @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# This script serves as the Cryptography build step of the +# This script serves as the cffi build step of the # [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python) # compiler. # @@ -9,6 +9,11 @@ # # This script is invoked by [`bin/compile`](/). +if [[ "$STACK" == "heroku-16" ]]; then + # libffi is pre-installed in the stack image so there is no need to vendor it. + return 0 +fi + # The location of the pre-compiled libffi binary. VENDORED_LIBFFI="https://lang-python.s3.amazonaws.com/$STACK/libraries/vendor/libffi.tar.gz" diff --git a/bin/steps/pylibmc b/bin/steps/pylibmc index 2ebba64ed1d592db455b1fb2b9bfb65aab7a5649..698d668455b2889d8ed57446751c1dfddf86a20d 100755 --- a/bin/steps/pylibmc +++ b/bin/steps/pylibmc @@ -9,6 +9,11 @@ # # This script is invoked by [`bin/compile`](/). +if [[ "$STACK" == "heroku-16" ]]; then + # libmemcached is pre-installed in the stack image so there is no need to vendor it. + return 0 +fi + # The location of the pre-compiled libmemcached binary. VENDORED_MEMCACHED="https://lang-python.s3.amazonaws.com/$STACK/libraries/vendor/libmemcache.tar.gz" @@ -16,7 +21,6 @@ VENDORED_MEMCACHED="https://lang-python.s3.amazonaws.com/$STACK/libraries/vendor # shellcheck source=bin/utils source "$BIN_DIR/utils" - # If pylibmc exists within requirements, use vendored libmemcached. if (pip-grep -s requirements.txt pylibmc &> /dev/null) then diff --git a/test/fixtures/cffi/requirements.txt b/test/fixtures/cffi/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..6a88e4b7c82cfbb885fce31950f22a9c3efe8d79 --- /dev/null +++ b/test/fixtures/cffi/requirements.txt @@ -0,0 +1 @@ +cffi diff --git a/test/run b/test/run index 3064ef91c643e9a45a6eef8916aa9656c0480d27..faec575523e3041e5213a1618d2dc2813313099f 100755 --- a/test/run +++ b/test/run @@ -47,6 +47,12 @@ testPsycopg2() { assertCapturedSuccess } +testCffi() { + compile "cffi" + assertCaptured "cffi" + assertCapturedSuccess +} + testPylibmc() { compile "pylibmc" assertCaptured "pylibmc"