Skip to content

Commit 813142b

Browse files
authored
Use the build package to build sdist and wheel distributions (#1823)
1 parent e03035b commit 813142b

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.github/workflows/cache_data.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ jobs:
3838
# Install GMT and other required dependencies from conda-forge
3939
- name: Install dependencies
4040
run: |
41-
mamba install gmt=6.3.0 \
42-
numpy pandas xarray netCDF4 packaging matplotlib
41+
mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \
42+
build matplotlib
4343
4444
# Install the package that we want to test
4545
- name: Install the package
4646
run: |
47-
python setup.py sdist --formats=zip
47+
python -m build --sdist
4848
pip install dist/*
4949
5050
# 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 & 3 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)
@@ -131,11 +131,10 @@ jobs:
131131
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
132132
ls -lhR ~/.gmt
133133
134-
135134
# Install the package that we want to test
136135
- name: Install the package
137136
run: |
138-
python setup.py sdist --formats=zip
137+
python -m build --sdist
139138
pip install dist/*
140139
141140
- 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

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies:
1414
# Optional dependencies
1515
- geopandas
1616
# Development dependencies (general)
17+
- build
1718
- dvc
1819
- ipython
1920
- jupyter

0 commit comments

Comments
 (0)