From a17550916500bf02a647bf6d7d354c3af76a58c3 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 29 Jan 2025 17:24:12 -0600 Subject: [PATCH 1/2] Fix handling of _version.py file --- .github/workflows/release-python.yml | 36 +++++++++++++++++++++++++++- .gitignore | 2 -- CHANGELOG.md | 4 ++++ 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index c0bb923..79d2b95 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -46,9 +46,43 @@ jobs: name: dist-${{ github.run_id }} path: ./dist/*.* + test_dist: + name: Test Distribution Files + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - uses: actions/setup-python@v5 + with: + # Build sdist on lowest supported Python + python-version: '3.9' + + - name: Download the dists + uses: actions/download-artifact@v4 + with: + name: dist-${{ github.run_id }} + path: dist/ + + - name: Test the sdist + run: | + cd dist + pip install *.tar.gz + python -c "import flask_pymongo" + pip uninstall -y flask_pymongo + + - name: Test the wheel + run: | + cd dist + pip install *.whl + python -c "import flask_pymongo" + pip uninstall -y flask_pymongo + publish: # https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi - needs: [build_dist] + needs: [test_dist] if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest environment: release diff --git a/.gitignore b/.gitignore index ab81941..d00d005 100644 --- a/.gitignore +++ b/.gitignore @@ -6,8 +6,6 @@ _build dist/ *.pyc .pytest_cache/ -_version.py -version.txt .eggs/ .tox/ build/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 95b329d..c629e71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - TDB +## 3.0.1 Jan 29, 2005 + +- Fix inclusion of `_version.py` file. + ## 3.0.0: Jan 29, 2025 - Support Flask 3.0+ and PyMongo 4.0+. From 1d7010a19f2e8c99627f2d52fbbb94e9afdb61e5 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 29 Jan 2025 17:26:33 -0600 Subject: [PATCH 2/2] fix order --- .github/workflows/release-python.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 79d2b95..519ef9d 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -47,6 +47,7 @@ jobs: path: ./dist/*.* test_dist: + needs: [build_dist] name: Test Distribution Files runs-on: ubuntu-latest steps: