From 6db6418b6943796cf7194f3abe70364500755937 Mon Sep 17 00:00:00 2001 From: Leonardo Andreta de Castro Date: Fri, 23 Oct 2020 14:02:39 +1100 Subject: [PATCH 1/6] remove check for poetry version --- setup-poetry.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-poetry.sh b/setup-poetry.sh index 19ab3b9e..2cccb7c2 100755 --- a/setup-poetry.sh +++ b/setup-poetry.sh @@ -11,7 +11,7 @@ then fi # Check Poetry installed -poetry --version | grep 0.12 +poetry --version if [ $? -ne 0 ] then echo "--- Poetry not detected, installing..." @@ -39,4 +39,4 @@ deactivate # Do the final install echo "--- Installing dependencies" -poetry update \ No newline at end of file +poetry update From 928d997a8cc4d696d485e20d950e69c7ad61e580 Mon Sep 17 00:00:00 2001 From: Leonardo Andreta de Castro Date: Fri, 23 Oct 2020 14:20:12 +1100 Subject: [PATCH 2/6] accepting poetry 1.x and 0.12.x --- setup-poetry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-poetry.sh b/setup-poetry.sh index 2cccb7c2..dc689d3c 100755 --- a/setup-poetry.sh +++ b/setup-poetry.sh @@ -11,7 +11,7 @@ then fi # Check Poetry installed -poetry --version +poetry --version | grep -E 'Poetry version (1|0.12).' if [ $? -ne 0 ] then echo "--- Poetry not detected, installing..." From 13f6e5f71c7fab8ea5a429001c142d20dcdd5ad6 Mon Sep 17 00:00:00 2001 From: Leonardo Andreta de Castro Date: Fri, 23 Oct 2020 14:39:52 +1100 Subject: [PATCH 3/6] update README.md --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c9085f52..8c6b7978 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,11 @@ Once the clone is complete, you have two options: 1. Using Poetry - ```shell - cd python-open-controls - ./setup-poetry.sh - ``` + Follow the instructions from the + [Poetry documentation](https://python-poetry.org/docs/#installation) to + install Poetry. - **Note:** if you are on Windows, you'll need to install - [Poetry](https://poetry.eustace.io) manually, and use: + After you have installed Poetry, use: ```bash cd python-open-controls From 47d2a9b87a8c8d6beaa40b4d4aa7779101e782ae Mon Sep 17 00:00:00 2001 From: Q-CTRL DevOps Date: Fri, 23 Oct 2020 03:40:31 +0000 Subject: [PATCH 4/6] Update setup.py/README.rst to match pyproject.toml/README.md --- README.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 42486e6f..55745b87 100644 --- a/README.rst +++ b/README.rst @@ -95,13 +95,11 @@ Once the clone is complete, you have two options: #. Using Poetry - .. code-block:: shell - - cd python-open-controls - ./setup-poetry.sh + Follow the instructions from the + `Poetry documentation `_ to + install Poetry. - **Note:** if you are on Windows, you'll need to install - `Poetry `_ manually, and use: + After you have installed Poetry, use: .. code-block:: bash From c6a6b124800abdf788abff0af7ee581542d95138 Mon Sep 17 00:00:00 2001 From: Leonardo Andreta de Castro Date: Fri, 23 Oct 2020 14:43:42 +1100 Subject: [PATCH 5/6] updating docs --- docs/installation.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 3c137b2e..a01650b0 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -57,13 +57,11 @@ Once the clone is complete, you have two options: #. Using Poetry - .. code-block:: shell - - cd python-open-controls - ./setup-poetry.sh + Follow the instructions from the + `Poetry documentation `_ to + install Poetry. - **Note:** if you are on Windows, you'll need to install - `Poetry `_ manually, and use: + After you have installed Poetry, use: .. code-block:: shell From 7c3ee2f1f7d800dfa1eabaa0300e45fc2dd8b29c Mon Sep 17 00:00:00 2001 From: Leonardo Andreta de Castro Date: Fri, 23 Oct 2020 14:44:12 +1100 Subject: [PATCH 6/6] removing setup-poetry.sh --- setup-poetry.sh | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100755 setup-poetry.sh diff --git a/setup-poetry.sh b/setup-poetry.sh deleted file mode 100755 index dc689d3c..00000000 --- a/setup-poetry.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -echo "--- Checking appropriate prerequisites are installed." - -# Check correct version of Python -python -V | grep 3.7 -if [ $? -ne 0 ] -then - echo "Please ensure you have Python 3.7 activated. Pyenv is recommended." - exit 1 -fi - -# Check Poetry installed -poetry --version | grep -E 'Poetry version (1|0.12).' -if [ $? -ne 0 ] -then - echo "--- Poetry not detected, installing..." - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python -fi - -# Do dry run to create virtual environment -echo "--- Using Poetry to create virtual environment" -poetry install --dry-run -q - -# Activate created virtual environment -echo "--- Activating virtual environment" -VIRTUAL_ENV=$(poetry run python -c "import os; print(os.environ['VIRTUAL_ENV'])") -echo "Virtual environment path is $VIRTUAL_ENV" -source $VIRTUAL_ENV/bin/activate -if [ $? -ne 0 ] -then - echo "Could not activate the virtual environment!" - exit 2 -fi - -echo "--- Updating pip and setuptools" -pip install -q --upgrade pip setuptools -deactivate - -# Do the final install -echo "--- Installing dependencies" -poetry update