From 867f36ad10522e49b80b6a36bc2b1f3bb0886336 Mon Sep 17 00:00:00 2001 From: Victor Westerhuis Date: Thu, 22 Jun 2023 11:11:31 +0200 Subject: [PATCH] Fix build from sdist PR #24 deduplicated the requirements, but this makes the sdist on PyPi fail to build, because requirements.txt is not included. This fix includes requirements.txt using MANIFEST.in and changes the publication workflow to use build instead of calling setup.py directly. build always builds the wheel from the sdist, so this error is prevented in the future. --- .github/workflows/pypi-publish.yml | 4 ++-- MANIFEST.in | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 0ba1f5c..2128c97 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -26,9 +26,9 @@ jobs: - name: Build Python distribution working-directory: . run: | - pip install wheel + pip install build rm -rf dist - python setup.py bdist_wheel sdist --formats gztar + pyproject-build - name: Publish a Python distribution to PyPI uses: pypa/gh-action-pypi-publish@master with: diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f9bd145 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include requirements.txt