mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
452443d420
Since the stack is end of life and builds have been disabled: https://devcenter.heroku.com/changelog-items/1943 There are only two temporarily exempted customers using Python, who can switch to the Cedar-14 support branch if they still need to build their Python apps (most of which haven't been built recently). Closes @W-8054727@.
56 lines
2.0 KiB
Bash
Executable File
56 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
shopt -s extglob
|
|
|
|
old-platform() {
|
|
if grep -qi 'InsecurePlatformWarning' "$WARNINGS_LOG"; then
|
|
echo
|
|
puts-warn "Hello! It looks like your application is using an outdated version of Python."
|
|
puts-warn "This caused the security warning you saw above during the 'pip install' step."
|
|
puts-warn "We recommend '$RECOMMENDED_PYTHON_VERSION', which you can specify in a 'runtime.txt' file."
|
|
puts-warn " -- Much Love, Heroku."
|
|
mcount 'warnings.python.old'
|
|
fi
|
|
}
|
|
|
|
scipy-included() {
|
|
if grep -qi 'running setup.py install for scipy' "$WARNINGS_LOG"; then
|
|
echo
|
|
puts-warn "Hello! It looks like you're trying to use scipy on Heroku."
|
|
puts-warn "Unfortunately, at this time, we do not directly support this library."
|
|
puts-warn "There is, however, a buildpack available that makes it possible to use it on Heroku."
|
|
puts-warn "You can learn more here: https://devcenter.heroku.com/articles/python-c-deps"
|
|
puts-warn "Sorry for the inconvenience. -- Much Love, Heroku."
|
|
mcount 'warnings.scipy'
|
|
fi
|
|
}
|
|
|
|
distribute-included() {
|
|
if grep -qi 'Running setup.py install for distribute' "$WARNINGS_LOG"; then
|
|
echo
|
|
puts-warn "Hello! Your requirements.txt file contains the distribute package."
|
|
puts-warn "This library is automatically installed by Heroku and shouldn't be in"
|
|
puts-warn "Your requirements.txt file. This can cause unexpected behavior."
|
|
puts-warn " -- Much Love, Heroku."
|
|
mcount 'warnings.distribute'
|
|
fi
|
|
}
|
|
|
|
six-included() {
|
|
if grep -qi 'Running setup.py install for six' "$WARNINGS_LOG"; then
|
|
echo
|
|
puts-warn "Hello! Your requirements.txt file contains the six package."
|
|
puts-warn "This library is automatically installed by Heroku and shouldn't be in"
|
|
puts-warn "Your requirements.txt file. This can cause unexpected behavior."
|
|
puts-warn " -- Much Love, Heroku."
|
|
mcount 'warnings.six'
|
|
fi
|
|
}
|
|
|
|
show-warnings() {
|
|
old-platform
|
|
scipy-included
|
|
distribute-included
|
|
six-included
|
|
}
|
|
|