Skip to content

Commit a175509

Browse files
committed
Fix handling of _version.py file
1 parent 0b2a025 commit a175509

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed

.github/workflows/release-python.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,43 @@ jobs:
4646
name: dist-${{ github.run_id }}
4747
path: ./dist/*.*
4848

49+
test_dist:
50+
name: Test Distribution Files
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0
56+
persist-credentials: false
57+
58+
- uses: actions/setup-python@v5
59+
with:
60+
# Build sdist on lowest supported Python
61+
python-version: '3.9'
62+
63+
- name: Download the dists
64+
uses: actions/download-artifact@v4
65+
with:
66+
name: dist-${{ github.run_id }}
67+
path: dist/
68+
69+
- name: Test the sdist
70+
run: |
71+
cd dist
72+
pip install *.tar.gz
73+
python -c "import flask_pymongo"
74+
pip uninstall -y flask_pymongo
75+
76+
- name: Test the wheel
77+
run: |
78+
cd dist
79+
pip install *.whl
80+
python -c "import flask_pymongo"
81+
pip uninstall -y flask_pymongo
82+
4983
publish:
5084
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi
51-
needs: [build_dist]
85+
needs: [test_dist]
5286
if: startsWith(github.ref, 'refs/tags/')
5387
runs-on: ubuntu-latest
5488
environment: release

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ _build
66
dist/
77
*.pyc
88
.pytest_cache/
9-
_version.py
10-
version.txt
119
.eggs/
1210
.tox/
1311
build/

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
- TDB
66

7+
## 3.0.1 Jan 29, 2005
8+
9+
- Fix inclusion of `_version.py` file.
10+
711
## 3.0.0: Jan 29, 2025
812

913
- Support Flask 3.0+ and PyMongo 4.0+.

0 commit comments

Comments
 (0)