3030 uses : actions/setup-python@v1
3131 with :
3232 python-version : ${{ matrix.python-version }}
33+
3334 - name : Build in confined environment and interpolate version
3435 run : |
3536 python -m venv /tmp/buildenv
3940 python setup.py sdist bdist_wheel
4041 python -m twine check dist/templateflow*
4142
43+ mv dist /tmp/package
44+ rm -rf templateflow.egg-info/
45+
4246 # Interpolate version
4347 if [[ "$GITHUB_REF" == refs/tags/* ]]; then
4448 TAG=${GITHUB_REF##*/}
@@ -47,14 +51,28 @@ jobs:
4751 THISVERSION=${TAG:-$THISVERSION}
4852 echo "Expected VERSION: \"${THISVERSION}\""
4953 echo ::set-env name=THISVERSION::"${THISVERSION}"
54+
55+ - name : Install in confined environment [pip]
56+ env :
57+ TEMPLATEFLOW_HOME : /tmp/home/pip
58+ run : |
59+ python -m venv /tmp/pip
60+ source /tmp/pip/bin/activate
61+ python -m pip install "setuptools ~= 42.0" "pip>=10.0.1"
62+ python -m pip install .
63+ INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")')
64+ echo "VERSION: \"${THISVERSION}\""
65+ echo "INSTALLED: \"${INSTALLED_VERSION}\""
66+ test "${INSTALLED_VERSION}" = "${THISVERSION}"
67+
5068 - name : Install in confined environment [sdist]
5169 env :
5270 TEMPLATEFLOW_HOME : /tmp/home/sdist
5371 run : |
5472 python -m venv /tmp/install_sdist
5573 source /tmp/install_sdist/bin/activate
5674 python -m pip install "setuptools ~= 42.0" "pip>=10.0.1"
57- python -m pip install dist /templateflow*.tar.gz
75+ python -m pip install /tmp/package /templateflow*.tar.gz
5876 INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")')
5977 echo "VERSION: \"${THISVERSION}\""
6078 echo "INSTALLED: \"${INSTALLED_VERSION}\""
@@ -65,15 +83,15 @@ jobs:
6583 TEMPLATEFLOW_HOME : /tmp/home/sdist
6684 run : |
6785 source /tmp/install_sdist/bin/activate
68- python -m pip install dist /templateflow*.tar.gz
86+ python -m pip install /tmp/package /templateflow*.tar.gz
6987 find ${TEMPLATEFLOW_HOME} >> /tmp/.sdist-install.txt
7088 - name : Re-install in confined environment [sdist - missing template]
7189 env :
7290 TEMPLATEFLOW_HOME : /tmp/home/sdist
7391 run : |
7492 rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym
7593 source /tmp/install_sdist/bin/activate
76- python -m pip install dist /templateflow*.tar.gz
94+ python -m pip install /tmp/package /templateflow*.tar.gz
7795 python -c "import templateflow; templateflow.update(overwrite=False)"
7896 find ${TEMPLATEFLOW_HOME} >> /tmp/.sdist-install-2.txt
7997 diff /tmp/.sdist-install.txt /tmp/.sdist-install-2.txt
86104 python -m venv /tmp/install_wheel
87105 source /tmp/install_wheel/bin/activate
88106 python -m pip install "setuptools ~= 42.0" "pip>=10.0.1"
89- python -m pip install dist /templateflow*.whl
107+ python -m pip install /tmp/package /templateflow*.whl
90108 INSTALLED_VERSION=$(python -c 'import templateflow as tf; print(tf.__version__, end="")')
91109 echo "INSTALLED: \"${INSTALLED_VERSION}\""
92110 test "${INSTALLED_VERSION}" = "${THISVERSION}"
@@ -96,15 +114,15 @@ jobs:
96114 TEMPLATEFLOW_HOME : /tmp/home/wheel
97115 run : |
98116 source /tmp/install_wheel/bin/activate
99- python -m pip install dist /templateflow*.whl
117+ python -m pip install /tmp/package /templateflow*.whl
100118 find ${TEMPLATEFLOW_HOME} >> /tmp/.wheel-install.txt
101119 - name : Re-install in confined environment [wheel - missing template]
102120 env :
103121 TEMPLATEFLOW_HOME : /tmp/home/wheel
104122 run : |
105123 rm -rf ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym
106124 source /tmp/install_wheel/bin/activate
107- python -m pip install dist /templateflow*.whl
125+ python -m pip install /tmp/package /templateflow*.whl
108126 # Wheels do not run post-install hooks:
109127 test ! -d ${TEMPLATEFLOW_HOME}/tpl-MNI152NLin2009cAsym
110128 python -c "import templateflow; templateflow.update(overwrite=False)"
0 commit comments