From 382e7582287960f93dd5273fe2084bfa6bf18d21 Mon Sep 17 00:00:00 2001 From: Andre Jasiskis Date: Mon, 27 Jul 2020 11:46:33 +0100 Subject: [PATCH 1/3] feat: support specifying Pipfile on containerized cli --- docker/docker-python-entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/docker-python-entrypoint.sh b/docker/docker-python-entrypoint.sh index 39b96acea7b..241886b8f45 100755 --- a/docker/docker-python-entrypoint.sh +++ b/docker/docker-python-entrypoint.sh @@ -49,6 +49,10 @@ if [ -n "${TARGET_FILE}" ]; then echo "Installing dependencies from setup.py" pip install -U -e "${PROJECT_PATH}" ;; + *Pipfile) + echo "Installing dependencies from Pipfile" + installPipfileDeps + ;; *) exitWithMsg "\"${PROJECT_PATH}/${TARGET_FILE}\" is not supported" 1 ;; From 57c9b00a5fa1a75e1f44c2af0beb8adff5c1e4bf Mon Sep 17 00:00:00 2001 From: Andre Jasiskis Date: Mon, 27 Jul 2020 12:35:23 +0100 Subject: [PATCH 2/3] feat: support setup.py automatic detection on containerized cli --- docker/docker-python-entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/docker-python-entrypoint.sh b/docker/docker-python-entrypoint.sh index 241886b8f45..12f64a349f5 100755 --- a/docker/docker-python-entrypoint.sh +++ b/docker/docker-python-entrypoint.sh @@ -62,7 +62,11 @@ fi if [ -f "${PROJECT_PATH}/requirements.txt" ]; then echo "Found requirement.txt" installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt" +elif [ -f "${PROJECT_PATH}/setup.py" ]; then + echo "Found setup.py" + pip install -U -e "${PROJECT_PATH}" elif [ -f "${PROJECT_PATH}/Pipfile" ]; then + echo "Found Pipfile" installPipfileDeps fi From 57e860b11a681e1ce03eb67a4dbfc3eafbc13002 Mon Sep 17 00:00:00 2001 From: Andre Jasiskis Date: Mon, 27 Jul 2020 12:36:40 +0100 Subject: [PATCH 3/3] fix: python autodetection in containerized env python on containerized env will auto detects only if file is not provided --- docker/docker-python-entrypoint.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docker/docker-python-entrypoint.sh b/docker/docker-python-entrypoint.sh index 12f64a349f5..fd887218210 100755 --- a/docker/docker-python-entrypoint.sh +++ b/docker/docker-python-entrypoint.sh @@ -59,15 +59,17 @@ if [ -n "${TARGET_FILE}" ]; then esac fi -if [ -f "${PROJECT_PATH}/requirements.txt" ]; then - echo "Found requirement.txt" - installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt" -elif [ -f "${PROJECT_PATH}/setup.py" ]; then - echo "Found setup.py" - pip install -U -e "${PROJECT_PATH}" -elif [ -f "${PROJECT_PATH}/Pipfile" ]; then - echo "Found Pipfile" - installPipfileDeps +if [ -z "${TARGET_FILE}" ]; then + if [ -f "${PROJECT_PATH}/requirements.txt" ]; then + echo "Found requirement.txt" + installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt" + elif [ -f "${PROJECT_PATH}/setup.py" ]; then + echo "Found setup.py" + pip install -U -e "${PROJECT_PATH}" + elif [ -f "${PROJECT_PATH}/Pipfile" ]; then + echo "Found Pipfile" + installPipfileDeps + fi fi bash docker-entrypoint.sh "$@"