Skip to content

Commit

Permalink
Fix build version for source distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA authored Sep 2, 2022
2 parents 1b540a0 + 6c959ef commit e32facf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 26 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- published

jobs:
build_wheels:
name: build wheel
build_packages:
name: build wheel & source distribtions
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -26,34 +26,19 @@ jobs:
with:
path: ${{ env.pythonLocation }}
key: build-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'setup.*') }}
- name: build wheel
run: pip wheel . -w dist --no-deps
- name: save wheel
- name: install build package
run: pip install build
- name: build package
run: python -m build
- name: save builds
uses: actions/upload-artifact@v2
with:
name: build
path: ./dist/*.whl
build_sdist:
name: package source
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: install Python
uses: actions/setup-python@v2
- name: install dependencies
run: pip install dunamai
- name: package source
run: python setup.py sdist
- name: save source package
uses: actions/upload-artifact@v2
with:
name: build
path: ./dist/*.tar.gz
path: ./dist
upload_pypi:
if: github.event_name == 'release'
name: publish to PyPI
needs: [ build_wheels, build_sdist ]
needs: [ build_packages ]
runs-on: ubuntu-latest
steps:
- name: retrieve wheel(s) and source
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel", "numpy"]
requires = ["setuptools>=45", "setuptools_scm[toml]>=7", "wheel", "numpy"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
Expand All @@ -17,7 +17,7 @@ maintainers = [
{name = "Soroosh Mani", email = "[email protected]"}
]
description = "Package to generate computational unstructured meshes from planetary modeling."
license = {file = "CC0"}
license = {file = "LICENSE"}
readme = "README.md"
requires-python = '>=3.7, <3.10'
dependencies = [
Expand Down

0 comments on commit e32facf

Please sign in to comment.