Skip to content

Commit afa1044

Browse files
committed
CI: Use build to generate sdist/wheel, remove setup.py install option
1 parent 75c2b85 commit afa1044

File tree

7 files changed

+24
-26
lines changed

7 files changed

+24
-26
lines changed

.github/workflows/misc.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
continue-on-error: true
2323
strategy:
2424
matrix:
25-
python-version: [3.8]
26-
install: ['setup']
25+
python-version: ["3.10"]
26+
install: ['pip']
2727
check: ['style', 'doc']
2828
pip-flags: ['']
2929
depends: ['REQUIREMENTS']

.github/workflows/pre-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
2929
python-version: ["3.9", "3.10"]
3030
architecture: ['x64', 'x86']
31-
install: ['setup']
31+
install: ['pip']
3232
check: ['test']
3333
pip-flags: ['PRE_PIP_FLAGS']
3434
depends: ['REQUIREMENTS']
@@ -37,7 +37,7 @@ jobs:
3737
# Pydicom master
3838
- os: ubuntu-latest
3939
python-version: "3.10"
40-
install: setup
40+
install: pip
4141
check: test
4242
pip-flags: ''
4343
depends: REQUIREMENTS

.github/workflows/stable.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,23 @@ jobs:
4040
# Basic dependencies only
4141
- os: ubuntu-latest
4242
python-version: 3.7
43-
install: setup
43+
install: pip
4444
check: test
4545
pip-flags: ''
4646
depends: REQUIREMENTS
4747
optional-depends: ''
4848
# Absolute minimum dependencies
4949
- os: ubuntu-latest
5050
python-version: 3.7
51-
install: setup
51+
install: pip
5252
check: test
5353
pip-flags: ''
5454
depends: MIN_REQUIREMENTS
5555
optional-depends: ''
5656
# Absolute minimum dependencies plus old MPL, Pydicom, Pillow
5757
- os: ubuntu-latest
5858
python-version: 3.7
59-
install: setup
59+
install: pip
6060
check: test
6161
pip-flags: ''
6262
depends: MIN_REQUIREMENTS

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
- DEPENDS="REQUIREMENTS"
1818
- OPTIONAL_DEPENDS="DEFAULT_OPT_DEPENDS"
1919
- EXTRA_PIP_FLAGS=""
20-
- INSTALL_TYPE="setup"
20+
- INSTALL_TYPE="pip"
2121
- CHECK_TYPE="test"
2222

2323
python:
@@ -35,7 +35,6 @@ before_install:
3535
# command to install dependencies
3636
install:
3737
- tools/ci/install.sh
38-
- if [ "$CHECK_TYPE" == "skiptests" ]; then exit 0; fi
3938

4039
# command to run tests, e.g. python setup.py test
4140
script:

tools/ci/build_archive.sh

+14-11
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@ echo "INSTALL_TYPE = $INSTALL_TYPE"
1111

1212
set -x
1313

14-
if [ "$INSTALL_TYPE" == "sdist" ]; then
15-
python setup.py egg_info # check egg_info while we're here
16-
python setup.py sdist
17-
export ARCHIVE=$( ls dist/*.tar.gz )
18-
elif [ "$INSTALL_TYPE" == "wheel" ]; then
19-
python setup.py bdist_wheel
20-
export ARCHIVE=$( ls dist/*.whl )
21-
elif [ "$INSTALL_TYPE" == "archive" ]; then
22-
export ARCHIVE="package.tar.gz"
14+
if [ "$INSTALL_TYPE" = "sdist" -o "$INSTALL_TYPE" = "wheel" ]; then
15+
python -m build
16+
elif [ "$INSTALL_TYPE" = "archive" ]; then
17+
ARCHIVE="package.tar.gz"
2318
git archive -o $ARCHIVE HEAD
24-
elif [ "$INSTALL_TYPE" == "pip" ]; then
25-
export ARCHIVE="."
2619
fi
2720

21+
if [ "$INSTALL_TYPE" = "sdist" ]; then
22+
ARCHIVE=$( ls dist/*.tar.gz )
23+
elif [ "$INSTALL_TYPE" = "wheel" ]; then
24+
ARCHIVE=$( ls dist/*.whl )
25+
elif [ "$INSTALL_TYPE" = "pip" ]; then
26+
ARCHIVE="."
27+
fi
28+
29+
export ARCHIVE
30+
2831
set +eux

tools/ci/env.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SETUP_REQUIRES="pip setuptools>=30.3.0 wheel"
1+
SETUP_REQUIRES="pip build"
22

33
# Minimum requirements
44
REQUIREMENTS="-r requirements.txt"

tools/ci/install.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ if [ -n "$EXTRA_PIP_FLAGS" ]; then
1818
EXTRA_PIP_FLAGS=${!EXTRA_PIP_FLAGS}
1919
fi
2020

21-
if [ "$INSTALL_TYPE" == "setup" ]; then
22-
python setup.py install
23-
else
24-
pip install $EXTRA_PIP_FLAGS $ARCHIVE
25-
fi
21+
pip install $EXTRA_PIP_FLAGS $ARCHIVE
2622

2723
# Basic import check
2824
python -c 'import nibabel; print(nibabel.__version__)'

0 commit comments

Comments
 (0)