From 5702f46ff2496a7ea56fe83ae6355a02097d2ce7 Mon Sep 17 00:00:00 2001 From: Ashley Gillman Date: Thu, 11 Feb 2021 20:59:16 +1000 Subject: [PATCH 1/5] ENH Add requirements.txt and text w/ Travis --- .travis.yml | 4 +--- requirements.txt | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 requirements.txt diff --git a/.travis.yml b/.travis.yml index 84cf09f7a..ccc5d2291 100644 --- a/.travis.yml +++ b/.travis.yml @@ -201,8 +201,6 @@ before_install: - $PY_EXE -m pip --version # setuptools may be out of date on osx - $PY_EXE -m pip install --user -U pip setuptools wheel -# ensure python bin dir exists (and coverage dependencies installed) -- $PY_EXE -m pip install --user -U nose codecov coveralls requests # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then @@ -233,7 +231,7 @@ before_install: - echo "cmake flags $BUILD_FLAGS $EXTRA_BUILD_FLAGS" install: -- $PY_EXE -m pip install --user --only-binary=numpy,scipy,matplotlib numpy scipy matplotlib deprecation nibabel +- $PY_EXE -m pip install --user requirements.txt - cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . # Job may timeout (>50min) if no ccache, otherwise should be <1min: - make diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..62f212e9b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +--only-binary=numpy +--only-binary=scipy +--only-binary=matplotlib +docopt +psutil +nose +coverage +#coveralls? +#requests? +#deprecation? +#nibabel? \ No newline at end of file From 7d703fe9962c99a3b0155a90867a4c6e50a46aa8 Mon Sep 17 00:00:00 2001 From: Kris Thielemans Date: Thu, 11 Feb 2021 14:50:16 +0100 Subject: [PATCH 2/5] fixed pip call --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ccc5d2291..eca3fbc9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -231,7 +231,7 @@ before_install: - echo "cmake flags $BUILD_FLAGS $EXTRA_BUILD_FLAGS" install: -- $PY_EXE -m pip install --user requirements.txt +- $PY_EXE -m pip install --user -r requirements.txt - cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . # Job may timeout (>50min) if no ccache, otherwise should be <1min: - make From 022dfad55c200190efcfb0ebddc5f66ed7790275 Mon Sep 17 00:00:00 2001 From: Ashley Gillman Date: Fri, 12 Feb 2021 16:16:43 +1000 Subject: [PATCH 3/5] Run pip install while still in SIRF directory --- .travis.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index eca3fbc9c..85148a5f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -192,15 +192,6 @@ before_install: sudo apt install libvtk7-dev fi fi -- $PY_EXE --version -# get pip -- curl -0 https://bootstrap.pypa.io/get-pip.py -o get-pip.py -- $PY_EXE get-pip.py --user -- echo "Using Python executable $PY_EXE" -- $PY_EXE --version -- $PY_EXE -m pip --version -# setuptools may be out of date on osx -- $PY_EXE -m pip install --user -U pip setuptools wheel # for counting clones, excluding ours - | if [[ -n "$GITHUB_API_TOKEN" ]]; then @@ -210,7 +201,7 @@ before_install: # count unique clones, excluding travis, and print total TRAVIS_REPO_SLUG=CCPPETMR/SIRF-SuperBuild gh_stats_count -k uniques fi -- $PY_EXE -m pip freeze +- $PY_EXE --version # ccache compiler override - ln -s "$(which ccache)" g++ - ln -s "$(which ccache)" g++-6 @@ -220,6 +211,16 @@ before_install: - ln -s "$(which ccache)" gcc-7 - export PATH="$PWD:$PATH" - popd +# get pip +- curl -0 https://bootstrap.pypa.io/get-pip.py -o get-pip.py +- $PY_EXE get-pip.py --user +- echo "Using Python executable $PY_EXE" +- $PY_EXE --version +- $PY_EXE -m pip --version +# setuptools may be out of date on osx +- $PY_EXE -m pip install --user -U pip setuptools wheel +- $PY_EXE -m pip freeze +- $PY_EXE -m pip install --user -r requirements.txt # no point re-downloading SIRF - just use local version # N.B.: don't put into build matrix to allow caching. - BUILD_FLAGS="$BUILD_FLAGS -DPYVER=$PYMVER -DSIRF_SOURCE_DIR:PATH=$PWD -DDISABLE_GIT_CHECKOUT_SIRF=ON" @@ -231,7 +232,6 @@ before_install: - echo "cmake flags $BUILD_FLAGS $EXTRA_BUILD_FLAGS" install: -- $PY_EXE -m pip install --user -r requirements.txt - cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . # Job may timeout (>50min) if no ccache, otherwise should be <1min: - make From 9f0da0932f6f5cdf955ab410fbb513c07c7f4c8d Mon Sep 17 00:00:00 2001 From: Ashley Gillman Date: Fri, 12 Feb 2021 16:35:23 +1000 Subject: [PATCH 4/5] Add optional requirements [no ci] --- optional-requirements.txt | 4 ++++ requirements.txt | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 optional-requirements.txt diff --git a/optional-requirements.txt b/optional-requirements.txt new file mode 100644 index 000000000..4a253c086 --- /dev/null +++ b/optional-requirements.txt @@ -0,0 +1,4 @@ +coveralls? +requests? +deprecation? +nibabel? diff --git a/requirements.txt b/requirements.txt index 62f212e9b..476ac6dd2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,3 @@ docopt psutil nose coverage -#coveralls? -#requests? -#deprecation? -#nibabel? \ No newline at end of file From 50fe36e14b57229e9cf5fdbc164ce98c44130864 Mon Sep 17 00:00:00 2001 From: Ashley Gillman Date: Mon, 15 Feb 2021 14:02:00 +1000 Subject: [PATCH 5/5] Fix binary requirement definition, specify ci requirements separately. --- .travis.yml | 1 + ci-requirements.txt | 2 ++ optional-requirements.txt | 4 ---- requirements.txt | 9 +++++---- 4 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 ci-requirements.txt delete mode 100644 optional-requirements.txt diff --git a/.travis.yml b/.travis.yml index 85148a5f7..118ccb047 100644 --- a/.travis.yml +++ b/.travis.yml @@ -221,6 +221,7 @@ before_install: - $PY_EXE -m pip install --user -U pip setuptools wheel - $PY_EXE -m pip freeze - $PY_EXE -m pip install --user -r requirements.txt +- $PY_EXE -m pip install --user -r ci-requirements.txt # no point re-downloading SIRF - just use local version # N.B.: don't put into build matrix to allow caching. - BUILD_FLAGS="$BUILD_FLAGS -DPYVER=$PYMVER -DSIRF_SOURCE_DIR:PATH=$PWD -DDISABLE_GIT_CHECKOUT_SIRF=ON" diff --git a/ci-requirements.txt b/ci-requirements.txt new file mode 100644 index 000000000..6103052b6 --- /dev/null +++ b/ci-requirements.txt @@ -0,0 +1,2 @@ +coveralls +coverage diff --git a/optional-requirements.txt b/optional-requirements.txt deleted file mode 100644 index 4a253c086..000000000 --- a/optional-requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -coveralls? -requests? -deprecation? -nibabel? diff --git a/requirements.txt b/requirements.txt index 476ac6dd2..01cf6aeff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,8 @@ ---only-binary=numpy ---only-binary=scipy ---only-binary=matplotlib +numpy --only-binary=numpy +scipy --only-binary=scipy +matplotlib --only-binary=matplotlib docopt psutil nose -coverage +deprecation +nibabel # optional