Skip to content

Commit 8b609ba

Browse files
committed
Use the build pacakge to build sdist and wheel distributions
1 parent 28a2aef commit 8b609ba

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

.github/workflows/cache_data.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ jobs:
3939
- name: Install dependencies
4040
run: |
4141
mamba install gmt=6.3.0 \
42-
numpy pandas xarray netCDF4 packaging matplotlib
42+
numpy pandas xarray netCDF4 packaging \
43+
build matplotlib
4344
4445
# Install the package that we want to test
4546
- name: Install the package
4647
run: |
47-
python setup.py sdist --formats=zip
48+
python -m build --sdist
4849
pip install dist/*
4950
5051
# Download remote files

.github/workflows/ci_docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: Install dependencies
7272
run: |
7373
mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \
74-
ipython make myst-parser geopandas \
74+
build ipython make myst-parser geopandas \
7575
sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme
7676
7777
# Show installed pkg information for postmortem diagnostic
@@ -99,7 +99,7 @@ jobs:
9999
# Install the package that we want to test
100100
- name: Install the package
101101
run: |
102-
python setup.py sdist --formats=zip
102+
python -m build --sdist
103103
pip install dist/*
104104
105105
# Build the documentation

.github/workflows/ci_tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
mamba install gmt=6.3.0 numpy=${{ matrix.numpy-version }} \
9797
pandas xarray netCDF4 packaging \
9898
${{ matrix.optional-packages }} \
99-
dvc make pytest>=6.0 \
99+
build dvc make pytest>=6.0 \
100100
pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery tomli
101101
102102
# Show installed pkg information for postmortem diagnostic
@@ -130,7 +130,7 @@ jobs:
130130
# Install the package that we want to test
131131
- name: Install the package
132132
run: |
133-
python setup.py sdist --formats=zip
133+
python -m build --sdist
134134
pip install dist/*
135135
136136
# Run the tests

.github/workflows/ci_tests_dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
geopandas ghostscript libnetcdf hdf5 zlib curl pcre make
9393
pip install --pre --prefer-binary \
9494
numpy pandas xarray netCDF4 packaging \
95-
dvc ipython 'pytest>=6.0' pytest-cov \
95+
build dvc ipython 'pytest>=6.0' pytest-cov \
9696
pytest-doctestplus pytest-mpl sphinx-gallery tomli
9797
9898
# Pull baseline image data from dvc remote (DAGsHub)
@@ -135,7 +135,7 @@ jobs:
135135
# Install the package that we want to test
136136
- name: Install the package
137137
run: |
138-
python setup.py sdist --formats=zip
138+
python -m build --sdist --wheel
139139
pip install dist/*
140140
141141
- name: Add GMT's bin to PATH (Linux/macOS)

.github/workflows/publish-to-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
python-version: '3.10'
3535

3636
- name: Install dependencies
37-
run: python -m pip install setuptools wheel
37+
run: python -m pip install build
3838

3939
# This step is only necessary for testing purposes and for TestPyPI
4040
- name: Fix up version string for TestPyPI

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ install:
2929
pip install --no-deps -e .
3030

3131
package:
32-
python setup.py sdist bdist_wheel
32+
python -m build --sdist --wheel
3333

3434
test:
3535
# Run a tmp folder to make sure the tests are run on the installed version

0 commit comments

Comments
 (0)