diff --git a/bin/compile b/bin/compile index bfde63aadbd72636b40bb21f7719ff59d16cd727..c034b72d07483a8b027e1cf53caddc7ebd812312 100755 --- a/bin/compile +++ b/bin/compile @@ -39,6 +39,7 @@ SETUPTOOLS_VERSION="19.6" # Common Problem Warnings export WARNINGS_LOG=$(mktemp) +export DEFAULT_PYTHON_VERSION # Setup bpwatch export PATH=$PATH:$ROOT_DIR/vendor/bpwatch diff --git a/bin/warnings b/bin/warnings index 0064b572c309a776d3f3a3d0bc2dff7530c5f5f1..eb106b7a9d606bcc57b605f3bca48ddc2a018fce 100755 --- a/bin/warnings +++ b/bin/warnings @@ -1,5 +1,14 @@ shopt -s extglob +old-platform() { + if grep -qi 'SNIMissingWarning' "$WARNINGS_LOG"; then + 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 '$DEFAULT_PYTHON_VERSION', which you can specify in a 'runtime.txt' file." + puts-warn " -- Much Love, Heroku." + fi +} + pylibmc-missing() { if grep -qi 'fatal error: libmemcached/memcached.h: No such file or directory' "$WARNINGS_LOG"; then puts-warn "Hello! There was a problem with your build related to libmemcache." @@ -23,11 +32,12 @@ distribute-included() { 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." + puts-warn " -- Much Love, Heroku." fi } show-warnings() { + old-platform pylibmc-missing scipy-included distribute-included