mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
Bash conditional operaters needed for brackets
Removing brackets also works Wrong diff check - inverted Remove uninstall step Whitespace is hard
This commit is contained in:
+6
-4
@@ -262,14 +262,14 @@ source "$BIN_DIR/steps/pipenv"
|
||||
# Uninstall removed dependencies with Pip.
|
||||
# The buildpack will automatically remove any declared dependencies (in requirements.txt)
|
||||
# that were explicitly removed. This machinery is a bit complex, but it is not complicated.
|
||||
(( start=$(nowms) ))
|
||||
# (( start=$(nowms) ))
|
||||
# shellcheck source=bin/steps/pip-uninstall
|
||||
source "$BIN_DIR/steps/pip-uninstall"
|
||||
mtime "pip.uninstall.time" "${start}"
|
||||
# source "$BIN_DIR/steps/pip-uninstall"
|
||||
# mtime "pip.uninstall.time" "${start}"
|
||||
|
||||
# If no requirements.txt file given, assume `setup.py develop` is intended.
|
||||
# This allows for people to ship a setup.py application to Heroku
|
||||
# (which is rare, but I vouch that it should work!)
|
||||
# TODO: hatchet test to confirm
|
||||
|
||||
if [ ! -f requirements.txt ] && [ ! -f Pipfile ]; then
|
||||
echo "-e ." > requirements.txt
|
||||
@@ -321,6 +321,8 @@ mtime "sqlite3.install.time" "${start}"
|
||||
source "$BIN_DIR/steps/pip-install"
|
||||
mtime "pip.install.time" "${start}"
|
||||
|
||||
|
||||
|
||||
# Support for NLTK corpora.
|
||||
# Note: this may only work on Python 2.7. I don't think many customers use this functionality,
|
||||
# and it should probably be undocumented.
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ fi
|
||||
echo "$(diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt")"
|
||||
|
||||
# Remove python dependencies
|
||||
if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]] || [[ diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt" ]]; then
|
||||
if [[ ! -f "$CACHE_DIR/.heroku/requirements.txt" ]] || ! diff "$BUILD_DIR/requirements.txt" "$CACHE_DIR/.heroku/requirements.txt" ; then
|
||||
puts-step "Clearing cached dependencies"
|
||||
rm -rf .heroku/python
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user