Commit 45b0d185 authored by Kenneth Reitz's avatar Kenneth Reitz

fix tests further

parent 8f258ae0
...@@ -158,7 +158,10 @@ source $BIN_DIR/steps/python ...@@ -158,7 +158,10 @@ source $BIN_DIR/steps/python
# Sanity check for setuptools/distribute. # Sanity check for setuptools/distribute.
source $BIN_DIR/steps/setuptools source $BIN_DIR/steps/setuptools
# Mercurial support. # Fix egg-links.
source $BIN_DIR/steps/eggpath-fix
# Pipenv support.
source $BIN_DIR/steps/pipenv source $BIN_DIR/steps/pipenv
# If no requirements.txt file given, assume `setup.py develop` is intended. # If no requirements.txt file given, assume `setup.py develop` is intended.
...@@ -215,15 +218,8 @@ bpwatch start post_compile ...@@ -215,15 +218,8 @@ bpwatch start post_compile
source $BIN_DIR/steps/hooks/post_compile source $BIN_DIR/steps/hooks/post_compile
bpwatch stop post_compile bpwatch stop post_compile
set +e # Fix egg-links, again.
# rewrite build dir in egg links to /app so things are found at runtime source $BIN_DIR/steps/eggpath-fix2
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
# Store new artifacts in cache. # Store new artifacts in cache.
bpwatch start dump_cache bpwatch start dump_cache
......
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
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
# Install dependencies with Pip. # Install dependencies with Pip.
puts-step "Installing requirements 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
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first [ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
......
#!/usr/bin/env bash #!/usr/bin/env bash
testPipenvVersion() {
compile "pipenv-version"
assertCaptured "3.6.0"
assertCapturedSuccess
}
testPipenv() { testPipenv() {
compile "pipenv" compile "pipenv"
debug
assertCapturedSuccess assertCapturedSuccess
} }
testPipenvVersion() {
compile "pipenv-version"
assertCaptured "3.6.0"
assertCapturedSuccess
}
testNoRequirements() { testNoRequirements() {
compile "no-requirements" compile "no-requirements"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment