Skip to content

Commit

Permalink
Use default version scheme for setuptools_scm (#149)
Browse files Browse the repository at this point in the history
Co-authored-by: Tom Nicholas <[email protected]>
  • Loading branch information
maxrjones and TomNicholas authored Jun 18, 2024
1 parent 7d242a7 commit 27a6f94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
- published
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read
Expand All @@ -29,14 +29,6 @@ jobs:
python -m pip install setuptools setuptools-scm wheel twine check-manifest
git clean -xdf
git restore -SW .
# This step is only necessary for testing purposes and for TestPyPI
- name: Fix up version string for TestPyPI
if: ${{ !startsWith(github.ref, 'refs/tags') }}
run: |
# Change setuptools-scm local_scheme to "no-local-version" so the
# local part of the version isn't included, making the version string
# compatible with PyPI.
sed --in-place "s/guess-next-dev/no-local-version/g" pyproject.toml
- name: Build tarball and wheels
run: |
python -m build --sdist --wheel .
Expand Down Expand Up @@ -82,6 +74,7 @@ jobs:
python -m pip install dist/virtualizarr*.whl
python -c "import virtualizarr; print(virtualizarr.__version__)"
- name: Publish package to TestPyPI
if: github.event_name == 'release'
uses: pypa/[email protected]
with:
repository-url: https://test.pypi.org/legacy/
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ requires = [
]

[tool.setuptools_scm]
local_scheme = "guess-next-dev"
fallback_version = "9999"

[tool.setuptools.packages.find]
Expand Down

0 comments on commit 27a6f94

Please sign in to comment.