mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
f74d4db8c5
* fixed the bug for pypy-5.8.0 * enable shellcheck in makefile Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * make compile script shellcheck compatible Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * let's see what this says * fix pip installation Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck detect script * shellcheck release Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck test-compile Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck warnings/utils * updated makefile Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck collectstatic Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck cryptography Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck eggpath fixes Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck gdal * shellcheck goes-libs Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck mercurial Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * nltk shellcheck * shellcheck pip-install Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck pip-uninstall Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck pipenv Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck pylibmc Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * shellcheck python Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * update makefile Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * final update to makefile Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * fix tests Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * actually fix the tests Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * update pipenv-python-version Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * requested fixes Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * update spellcheck sources * attempted fix for shell globbing Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * further attempted fix Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * switch nltk styling Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * no more need for temp app for installing pip Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * attempt at staged build for shellcheck Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * attempted fix of travis file Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * reorder travis file * add shellcheck to install * make things clearer in travis file Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * better travis file Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * attempt at better travis file Signed-off-by: Kenneth Reitz <me@kennethreitz.org> * better travis file Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
67 lines
2.4 KiB
Bash
Executable File
67 lines
2.4 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
|
|
}
|
|
|
|
pylibmc-missing() {
|
|
if grep -qi 'fatal error: libmemcached/memcached.h: No such file or directory' "$WARNINGS_LOG"; then
|
|
echo
|
|
puts-warn "Hello! There was a problem with your build related to libmemcache."
|
|
puts-warn "The Python library 'pylibmc' must be explicitly specified in 'requirements.txt' in order to build correctly."
|
|
puts-warn "Once you do that, everything should work as expected. -- Much Love, Heroku."
|
|
mcount 'warnings.libmemcache'
|
|
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
|
|
pylibmc-missing
|
|
scipy-included
|
|
distribute-included
|
|
six-included
|
|
}
|
|
|