From d9fe0ed42d42f0aa4761f0a51be9da3236085b61 Mon Sep 17 00:00:00 2001 From: Peter Mounce Date: Tue, 27 Oct 2020 09:33:08 +0000 Subject: [PATCH 1/2] Workflow; support, but don't require, pyenv Travis automatically has pyenv + pyenv-virtualenv support, so I expect/hope this to be lovely. --- .python-version | 1 + dev/setup_env_osx.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 .python-version diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..aaf18d2 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.7.5 diff --git a/dev/setup_env_osx.sh b/dev/setup_env_osx.sh index 3407f90..326ac65 100755 --- a/dev/setup_env_osx.sh +++ b/dev/setup_env_osx.sh @@ -1,15 +1,15 @@ #!/bin/bash -set -eo pipefail +set -o errexit -o nounset -o pipefail + +readonly repo_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd -P)" command -v "python3" >/dev/null 2>&1 || { - echo >&2 "I require python3 but it's not installed. Officially supported version is 3.7.5" + echo >&2 "I require python3 but it's not installed. Officially supported version is $(cat "${repo_root}/../.python-version")" exit 1 } -readonly root="${BASH_SOURCE%/*}/.." - # Setup python virtualenv for running tests -readonly venv_dir="${root}/.dev-venv" +readonly venv_dir="${repo_root}/.dev-venv" python3 -m pip install virtualenv python3 -m virtualenv "${venv_dir}" @@ -21,8 +21,8 @@ else venv_bin="${venv_dir}/bin" fi -"${venv_bin}/python" -m pip install -r "${root}/python/requirements.txt" -"${venv_bin}/python" -m pip install -r "${root}/ci/requirements.txt" +"${venv_bin}/python" -m pip install -r "${repo_root}/python/requirements.txt" +"${venv_bin}/python" -m pip install -r "${repo_root}/ci/requirements.txt" # Install p4d binary if missing if ! [[ -x "$(command -v p4d)" ]]; then From 53814b41fd6d3e4f59d72a11ddf2fd553e505a7d Mon Sep 17 00:00:00 2001 From: Peter Mounce Date: Tue, 27 Oct 2020 12:59:51 +0000 Subject: [PATCH 2/2] curious --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index bb1f73a..0d39e48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,10 @@ language: python # cache: pip # not enough installed via pip to justify python: - '3.6' + - '3.7' os: - linux + - osx before_install: - pip install -U pip install: