mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
cleanups
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Install dependencies with Pip.
|
||||
puts-cmd "pip install -r requirements.txt"
|
||||
puts-step "Installing dependencies with pip"
|
||||
|
||||
set +e
|
||||
# delete any existing egg links, to uninstall exisisting installations.
|
||||
|
||||
+4
-2
@@ -2,9 +2,11 @@
|
||||
|
||||
if [[ -f Pipfile ]]; then
|
||||
if [[ ! -f requirements.txt ]]; then
|
||||
puts-step "Generating 'requirements.txt' with pipenv"
|
||||
|
||||
/app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null
|
||||
puts-step "Installing pipenv"
|
||||
/app/.heroku/python/bin/python $ROOT_DIR/vendor/get-pipenv.py &> /dev/null
|
||||
|
||||
puts-step "Generating 'requirements.txt' with pipenv"
|
||||
/app/.heroku/python/bin/pipenv lock --requirements > requirements.txt 2> /dev/null
|
||||
|
||||
pipstrip requirements.txt
|
||||
|
||||
@@ -4,19 +4,18 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
|
||||
|
||||
if [[ ! -f $BUILD_DIR/runtime.txt ]]; then
|
||||
if [[ ! -f Pipfile.lock ]]; then
|
||||
puts-step "Pipfile.lock not found, creating..."
|
||||
/app/.heroku/python/bin/pipenv lock 2> /dev/null
|
||||
fi
|
||||
puts-warn "Pipfile.lock not found!"
|
||||
else
|
||||
set +e
|
||||
PYTHON=$(cat $BUILD_DIR/Pipfile.lock | jq '._meta.requires.python_version' -r) 2>&1 /dev/null
|
||||
set -e
|
||||
|
||||
set +e
|
||||
PYTHON=$(cat $BUILD_DIR/Pipfile.lock | jq '._meta.requires.python_version' -r)
|
||||
set -e
|
||||
|
||||
if [ "$PYTHON" = 2.7 ]; then
|
||||
echo "python-2.7.13" > $BUILD_DIR/runtime.txt
|
||||
fi
|
||||
if [ "$PYTHON" = 3.6 ]; then
|
||||
echo "python-3.6.0" > $BUILD_DIR/runtime.txt
|
||||
if [ "$PYTHON" = 2.7 ]; then
|
||||
echo "python-2.7.13" > $BUILD_DIR/runtime.txt
|
||||
fi
|
||||
if [ "$PYTHON" = 3.6 ]; then
|
||||
echo "python-3.6.0" > $BUILD_DIR/runtime.txt
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ if [ "$FRESH_PYTHON" ] || pip list -o --format=legacy --disable-pip-version-chec
|
||||
TMPTARDIR=$(mktemp -d)
|
||||
trap "rm -rf $TMPTARDIR" RETURN
|
||||
|
||||
puts-step "Bootstrapping pip"
|
||||
puts-step "Installing pip"
|
||||
/app/.heroku/python/bin/python $ROOT_DIR/vendor/get-pip.py | indent
|
||||
/app/.heroku/python/bin/pip install setuptools --upgrade &> /dev/null
|
||||
|
||||
|
||||
+13
-14
@@ -1,23 +1,22 @@
|
||||
{
|
||||
"default": {
|
||||
"requests": {
|
||||
"version": "==2.13.0",
|
||||
"hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb"
|
||||
}
|
||||
},
|
||||
"develop": {},
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e"
|
||||
},
|
||||
"requires": {
|
||||
"python_version": "3.6"
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://pypi.python.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
],
|
||||
"requires": {
|
||||
"python_version": "3.6"
|
||||
},
|
||||
"hash": {
|
||||
"sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e"
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"requests": {
|
||||
"version": "==2.13.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
testPipenv() {
|
||||
compile "pipenv"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
|
||||
testNoRequirements() {
|
||||
@@ -16,6 +20,7 @@ testNLTK() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
testPipenvVersion() {
|
||||
compile "pipenv-version"
|
||||
assertCaptured "3.6.0"
|
||||
@@ -27,10 +32,6 @@ testNewlineRuntime() {
|
||||
assertCaptured "2.7.11"
|
||||
}
|
||||
|
||||
testPipenv() {
|
||||
compile "pipenv"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
|
||||
testSetupPy() {
|
||||
|
||||
+20068
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user