Skip to content

Commit

Permalink
Use the build package to build sdist and wheel distributions (Generic…
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman authored and Josh Sixsmith committed Dec 21, 2022
1 parent dde99e8 commit cfb4b9a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ jobs:
# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
run: |
mamba install gmt=6.3.0 \
numpy pandas xarray netCDF4 packaging matplotlib
mamba install gmt=6.3.0 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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -131,11 +131,10 @@ jobs:
touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt
ls -lhR ~/.gmt
# 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/*
- name: Add GMT's bin to PATH (Linux/macOS)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
# Optional dependencies
- geopandas
# Development dependencies (general)
- build
- dvc
- ipython
- jupyter
Expand Down

0 comments on commit cfb4b9a

Please sign in to comment.