From f86ceaddfb5984681e6dfcdbfd8e683713ac2342 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 26 Sep 2017 09:23:49 -0400 Subject: [PATCH] check for python_full_version too Signed-off-by: Kenneth Reitz --- bin/steps/pipenv-python-version | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bin/steps/pipenv-python-version b/bin/steps/pipenv-python-version index 23aa12a..16b16f5 100755 --- a/bin/steps/pipenv-python-version +++ b/bin/steps/pipenv-python-version @@ -10,15 +10,20 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then fi if [[ -f $BUILD_DIR/Pipfile.lock ]]; then set +e - PYTHON=$(jq -r '._meta.requires.python_version' "$BUILD_DIR/Pipfile.lock") + PYTHON=$(jq -r '._meta.requires.python_full_version' "$BUILD_DIR/Pipfile.lock") set -e - if [ "$PYTHON" = 2.7 ]; then - echo "python-2.7.13" > "$BUILD_DIR/runtime.txt" - fi - if [ "$PYTHON" = 3.6 ]; then - echo "python-3.6.2" > "$BUILD_DIR/runtime.txt" + if [[ ! "$PYTHON" ]]; then + PYTHON=$(jq -r '._meta.requires.python_version' "$BUILD_DIR/Pipfile.lock") + if [ "$PYTHON" = 2.7 ]; then + echo "python-2.7.13" > "$BUILD_DIR/runtime.txt" + fi + if [ "$PYTHON" = 3.6 ]; then + echo "python-3.6.2" > "$BUILD_DIR/runtime.txt" + fi fi + + fi fi fi