From 7a19addd8b5200f8e61360657964233e7bfae13d Mon Sep 17 00:00:00 2001 From: Jonas L Date: Thu, 22 Jun 2023 10:32:49 +0200 Subject: [PATCH] feat: adhere to PEP 517 (#213) * feat: adhere to PEP 517 Use the modern PEP 517 build system. https://peps.python.org/pep-0517/ * ci: build package using build --- .github/workflows/release.yml | 16 ++++++++++------ pyproject.toml | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 pyproject.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b4214a9c..820b3a73 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,18 +9,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.x" + - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish + pip install --upgrade pip + pip install --upgrade build twine + + - name: Build + run: python3 -m build + + - name: Publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* + run: twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..9787c3bd --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools", "wheel"] +build-backend = "setuptools.build_meta"