Skip to content

Commit

Permalink
Update version_scheme for testing on TestPyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrjones committed Jun 12, 2024
1 parent b5f6778 commit 98ecae4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,18 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install setuptools setuptools-scm wheel twine check-manifest
- name: Build tarball and wheels
run: |
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 .
- name: Check built artifacts
run: |
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ requires = [
]

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

[tool.setuptools.packages.find]
Expand Down

0 comments on commit 98ecae4

Please sign in to comment.