diff --git a/.travis.yml b/.travis.yml index 84cf09f7a..118ccb047 100644 --- a/.travis.yml +++ b/.travis.yml @@ -192,17 +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 -# 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 @@ -212,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 @@ -222,6 +211,17 @@ 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 +- $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" @@ -233,7 +233,6 @@ 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 - cmake $BUILD_FLAGS $EXTRA_BUILD_FLAGS . # Job may timeout (>50min) if no ccache, otherwise should be <1min: - make 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/requirements.txt b/requirements.txt new file mode 100644 index 000000000..01cf6aeff --- /dev/null +++ b/requirements.txt @@ -0,0 +1,8 @@ +numpy --only-binary=numpy +scipy --only-binary=scipy +matplotlib --only-binary=matplotlib +docopt +psutil +nose +deprecation +nibabel # optional