diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 6fb975889e9..edd9d38838b 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -39,12 +39,13 @@ jobs: - name: Install dependencies run: | mamba install gmt=6.3.0 \ - numpy pandas xarray netCDF4 packaging matplotlib + numpy pandas xarray netCDF4 packaging \ + build matplotlib # Install the package that we want to test - name: Install the package run: | - python setup.py sdist --formats=zip + python -m build --sdist pip install dist/* # Download remote files diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index 71ab4d5efb0..dc5802f0d70 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -71,7 +71,7 @@ jobs: - name: Install dependencies run: | mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \ - ipython make myst-parser geopandas \ + build ipython make myst-parser geopandas \ sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme # Show installed pkg information for postmortem diagnostic @@ -99,7 +99,7 @@ jobs: # Install the package that we want to test - name: Install the package run: | - python setup.py sdist --formats=zip + python -m build --sdist pip install dist/* # Build the documentation diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 0bcb185fd58..d5912a7efed 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -96,7 +96,7 @@ jobs: mamba install gmt=6.3.0 numpy=${{ matrix.numpy-version }} \ pandas xarray netCDF4 packaging \ ${{ matrix.optional-packages }} \ - dvc make pytest>=6.0 \ + build dvc make pytest>=6.0 \ pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery tomli # Show installed pkg information for postmortem diagnostic @@ -130,7 +130,7 @@ jobs: # Install the package that we want to test - name: Install the package run: | - python setup.py sdist --formats=zip + python -m build --sdist pip install dist/* # Run the tests diff --git a/.github/workflows/ci_tests_dev.yaml b/.github/workflows/ci_tests_dev.yaml index 3b59aeb7ff5..8a6952759a9 100644 --- a/.github/workflows/ci_tests_dev.yaml +++ b/.github/workflows/ci_tests_dev.yaml @@ -92,7 +92,7 @@ jobs: geopandas ghostscript libnetcdf hdf5 zlib curl pcre make pip install --pre --prefer-binary \ numpy pandas xarray netCDF4 packaging \ - dvc ipython 'pytest>=6.0' pytest-cov \ + build dvc ipython 'pytest>=6.0' pytest-cov \ pytest-doctestplus pytest-mpl sphinx-gallery tomli # Pull baseline image data from dvc remote (DAGsHub) @@ -135,7 +135,7 @@ jobs: # Install the package that we want to test - name: Install the package run: | - python setup.py sdist --formats=zip + python -m build --sdist --wheel pip install dist/* - name: Add GMT's bin to PATH (Linux/macOS) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 252bf56e5cd..2221abe0894 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -34,7 +34,7 @@ jobs: python-version: '3.10' - name: Install dependencies - run: python -m pip install setuptools wheel + run: python -m pip install build # This step is only necessary for testing purposes and for TestPyPI - name: Fix up version string for TestPyPI diff --git a/Makefile b/Makefile index 37339c4f77b..30b78c92093 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ install: pip install --no-deps -e . package: - python setup.py sdist bdist_wheel + python -m build --sdist --wheel test: # Run a tmp folder to make sure the tests are run on the installed version