diff --git a/bin/compile b/bin/compile index 1532cdd..3f3c04c 100755 --- a/bin/compile +++ b/bin/compile @@ -158,7 +158,10 @@ source $BIN_DIR/steps/python # Sanity check for setuptools/distribute. source $BIN_DIR/steps/setuptools -# Mercurial support. +# Fix egg-links. +source $BIN_DIR/steps/eggpath-fix + +# Pipenv support. source $BIN_DIR/steps/pipenv # If no requirements.txt file given, assume `setup.py develop` is intended. @@ -215,15 +218,8 @@ bpwatch start post_compile source $BIN_DIR/steps/hooks/post_compile bpwatch stop post_compile -set +e -# rewrite build dir in egg links to /app so things are found at runtime -find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)#/app#" &> /dev/null -set -e - -set +e -# Support for PyPy -find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)#/app#" &> /dev/null -set -e +# Fix egg-links, again. +source $BIN_DIR/steps/eggpath-fix2 # Store new artifacts in cache. bpwatch start dump_cache diff --git a/bin/steps/eggpath-fix b/bin/steps/eggpath-fix new file mode 100644 index 0000000..65d16d2 --- /dev/null +++ b/bin/steps/eggpath-fix @@ -0,0 +1,11 @@ +set +e +# delete any existing egg links, to uninstall exisisting installations. +find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -delete 2> /dev/null +find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null +set -e + +set +e +# Support for the above, for PyPy. +find .heroku/python/lib-python/*/site-packages/ -name "*.egg-link" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#$(pwd)/#" &> /dev/null +find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null +set -e \ No newline at end of file diff --git a/bin/steps/eggpath-fix2 b/bin/steps/eggpath-fix2 new file mode 100644 index 0000000..f119a29 --- /dev/null +++ b/bin/steps/eggpath-fix2 @@ -0,0 +1,9 @@ +set +e +# rewrite build dir in egg links to /app so things are found at runtime +find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)#/app#" &> /dev/null +set -e + +set +e +# Support for PyPy +find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#$(pwd)#/app#" &> /dev/null +set -e \ No newline at end of file diff --git a/bin/steps/pip-install b/bin/steps/pip-install index cbec332..6fe6e72 100755 --- a/bin/steps/pip-install +++ b/bin/steps/pip-install @@ -1,19 +1,6 @@ # Install dependencies with Pip. puts-step "Installing requirements with pip" -set +e -# delete any existing egg links, to uninstall exisisting installations. -find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -delete 2> /dev/null -find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null -set -e - -set +e -# Support for the above, for PyPy. -find .heroku/python/lib-python/*/site-packages/ -name "*.egg-link" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#$(pwd)/#" &> /dev/null -find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null -set -e - - [ ! "$FRESH_PYTHON" ] && bpwatch start pip_install [ "$FRESH_PYTHON" ] && bpwatch start pip_install_first diff --git a/test/run b/test/run index b7e14c1..c14b2b1 100755 --- a/test/run +++ b/test/run @@ -1,19 +1,18 @@ #!/usr/bin/env bash + +testPipenv() { + compile "pipenv" + debug + assertCapturedSuccess +} + testPipenvVersion() { compile "pipenv-version" assertCaptured "3.6.0" assertCapturedSuccess } - -testPipenv() { - compile "pipenv" - assertCapturedSuccess -} - - - testNoRequirements() { compile "no-requirements" assertCapturedError diff --git a/vendor/pip-9.0.1.tar.gz b/vendor/pip-9.0.1.tar.gz deleted file mode 100644 index 5416b0d..0000000 Binary files a/vendor/pip-9.0.1.tar.gz and /dev/null differ