@@ -150,53 +150,44 @@ jobs:
150
150
- run :
151
151
name : Prepare build environment
152
152
command : |
153
- virtualenv --python=python3 /tmp/build
154
- source /tmp/build /bin/activate
155
- python3 -m pip install "setuptools ~= 42.0" "setuptools_scm[toml] >= 3.4" "pip>=10.0.1 " \
156
- twine docutils
153
+ python3 -m venv /tmp/buildenv
154
+ source /tmp/buildenv /bin/activate
155
+ python3 -m pip install "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" \
156
+ "pip>=10.0.1" twine docutils
157
157
- run :
158
- name : Build NiTransforms in build environment
158
+ name : Build NiTransforms in build environment and check
159
159
command : |
160
- source /tmp/build/bin/activate
160
+ source /tmp/buildenv/bin/activate
161
+ python3 setup.py check -r -s
161
162
python setup.py sdist bdist_wheel
162
- - run :
163
- name : Check sdist package in build environment
164
- command : |
165
- source /tmp/build/bin/activate
166
163
twine check dist/nitransforms*
167
164
- store_artifacts :
168
165
path : /tmp/src/nitransforms/dist
169
166
- run :
170
- name : Prepare sdist install environment
167
+ name : Install on separate environment and check version [sdist]
171
168
command : |
172
- virtualenv --python=python3 /tmp/install_sdist
169
+ python3 -m venv /tmp/install_sdist
173
170
source /tmp/install_sdist/bin/activate
174
171
python3 -m pip install "setuptools ~= 42.0" "setuptools_scm[toml] >= 3.4" "pip>=10.0.1"
175
- - run :
176
- name : Install sdist package into install environment and check version
177
- command : |
178
- source /tmp/install_sdist/bin/activate
179
- THISVERSION=$( python setup.py --version )
172
+
173
+ THISVERSION=$( python3 setup.py --version )
180
174
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
181
- pip install dist/nitransforms*.tar.gz
182
- INSTALLED_VERSION=$(python -c 'import nitransforms as nit; print(nit.__version__, end="")')
175
+ python3 -m pip install dist/nitransforms*.tar.gz
176
+ INSTALLED_VERSION=$(python3 -c 'import nitransforms as nit; print(nit.__version__, end="")')
183
177
echo "VERSION: \"${THISVERSION}\""
184
178
echo "INSTALLED: \"${INSTALLED_VERSION}\""
185
179
test "${INSTALLED_VERSION}" = "${THISVERSION}"
186
180
- run :
187
- name : Prepare wheel install environment
188
- command : |
189
- virtualenv --python=python3 /tmp/install_wheel
190
- source /tmp/install_wheel/bin/activate
191
- python3 -m pip install "setuptools ~= 42.0" "setuptools_scm[toml] >= 3.4" "pip>=10.0.1"
192
- - run :
193
- name : Install wheel into install environment and check version
181
+ name : Install on separate environment and check version [wheel]
194
182
command : |
183
+ python3 -m venv /tmp/install_wheel
195
184
source /tmp/install_wheel/bin/activate
196
- THISVERSION=$( python setup.py --version )
185
+ python3 -m pip install "setuptools ~= 42.0" wheel "setuptools_scm[toml] >= 3.4" "pip>=10.0.1"
186
+
187
+ THISVERSION=$( python3 setup.py --version )
197
188
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
198
- pip install dist/nitransforms*.whl
199
- INSTALLED_VERSION=$(python -c 'import nitransforms as nit; print(nit.__version__, end="")')
189
+ python3 -m pip install dist/nitransforms*.whl
190
+ INSTALLED_VERSION=$(python3 -c 'import nitransforms as nit; print(nit.__version__, end="")')
200
191
echo "VERSION: \"${THISVERSION}\""
201
192
echo "INSTALLED: \"${INSTALLED_VERSION}\""
202
193
test "${INSTALLED_VERSION}" = "${THISVERSION}"
@@ -208,26 +199,13 @@ jobs:
208
199
steps :
209
200
- checkout
210
201
- run :
211
- name : Install build depends
212
- command : python3 -m pip install "setuptools ~= 42.0" "setuptools_scm[toml] >= 3.4" "pip>=10.0.1" "twine<2.0" docutils
213
- - run :
214
- name : Build and check
202
+ name : Build and upload to Pypi
215
203
command : |
216
- python3 setup.py check -r -s
217
- python3 setup.py sdist
204
+ python3 -m venv /tmp/buildenv
205
+ source /tmp/buildenv/bin/activate
206
+ python3 -m pip install "setuptools ~= 42.0" "setuptools_scm[toml] >= 3.4" wheel "pip>=10.0.1" twine docutils
207
+ python3 setup.py sdist bdist_wheel
218
208
python3 -m twine check dist/*
219
- - run :
220
- name : Validate version
221
- command : |
222
- THISVERSION=$( python setup.py --version )
223
- python3 -m pip install dist/*.tar.gz
224
- mkdir empty
225
- cd empty
226
- INSTALLED=$( python3 -c 'import nitransforms; print(nitransforms.__version__)' )
227
- test "${CIRCLE_TAG:-$THISVERSION}" == "$INSTALLED"
228
- - run :
229
- name : Upload to PyPi
230
- command : |
231
209
python3 -m twine upload dist/*
232
210
233
211
workflows :
0 commit comments