Skip to content

Commit 744d263

Browse files
committed
CI: Use pipx and build to ensure coherent build and twine environments
1 parent b0ceaba commit 744d263

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

.circleci/config.yml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -423,17 +423,17 @@ jobs:
423423
steps:
424424
- checkout
425425
- run:
426-
name: Install build depends
427-
command: python -m pip install "setuptools>=40.8.0" "pip>=19" "twine<2.0" docutils
426+
name: Install pipx
427+
command: python -m pip install pipx
428428
- run:
429429
name: Build and check
430430
command: |
431-
python setup.py sdist
432-
python -m twine check dist/*
431+
pipx run build
432+
pipx run twine check dist/*
433433
- run:
434434
name: Validate version
435435
command: |
436-
THISVERSION=$( python get_version.py )
436+
THISVERSION=$( python3 get_version.py )
437437
python -m pip install dist/*.tar.gz
438438
mkdir empty
439439
cd empty
@@ -447,27 +447,17 @@ jobs:
447447
steps:
448448
- checkout
449449
- run:
450-
name: Install build depends
451-
command: python -m pip install "setuptools>=40.8.0" "pip>=19" "twine<2.0" docutils
450+
name: Install pipx
451+
command: python -m pip install pipx
452452
- run:
453453
name: Build and check
454454
command: |
455-
python setup.py check -r -s
456-
python setup.py sdist
457-
python -m twine check dist/*
458-
- run:
459-
name: Validate version
460-
command: |
461-
THISVERSION=$( python3 get_version.py )
462-
python -m pip install dist/*.tar.gz
463-
mkdir empty
464-
cd empty
465-
INSTALLED=$( python -c 'import niworkflows; print(niworkflows.__version__)' )
466-
test "${CIRCLE_TAG:-$THISVERSION}" == "$INSTALLED"
455+
pipx run build
456+
pipx run twine check dist/*
467457
- run:
468458
name: Upload to PyPi
469459
command: |
470-
python -m twine upload dist/*
460+
pipx run twine upload dist/*
471461
472462
deploy_docker:
473463
machine:

0 commit comments

Comments
 (0)