Skip to content

Commit

Permalink
Merge pull request #379 from jazzband/pep517
Browse files Browse the repository at this point in the history
 Adopt PEP 517 tooling for builds
  • Loading branch information
WhyNotHugo authored Oct 14, 2023
2 parents c84fbc7 + 0d5a767 commit 9855b63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,31 @@ on:
jobs:
build:
if: github.repository == 'jazzband/django-payments'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
- uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.10

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel
python -m pip install -U setuptools twine wheel build
- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
python -m setuptools_scm
python -m build --sdist --wheel --no-isolation
twine check dist/*
- name: Upload packages to Jazzband
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: jazzband
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"]

[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
Expand Down Expand Up @@ -51,3 +54,7 @@ required-imports = ["from __future__ import annotations"]
# This likely needs to be addressed in Django itself (either use an immutable
# type or annotate these fields as ClassVar)
"testapp/testapp/testmain/migrations/0*.py"= ["RUF012"]

[tool.setuptools_scm]
write_to = "payments/version.py"
version_scheme = "post-release"

0 comments on commit 9855b63

Please sign in to comment.