From 45b00e32a70efabb92da1297ce0337a61cf81723 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz <me@kennethreitz.org> Date: Mon, 8 Feb 2016 20:53:04 -0500 Subject: [PATCH] warn for pip's SNIMissingWarning --- bin/compile | 1 + bin/warnings | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/bin/compile b/bin/compile index bfde63aa..c034b72d 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 0064b572..eb106b7a 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 -- GitLab