Skip to content

Commit 8796a8c

Browse files
authored
Fix handling of _version.py file (#187)
1 parent 0b2a025 commit 8796a8c

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

Diff for: .github/workflows/release-python.yml

+36-1
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,44 @@ jobs:
4646
name: dist-${{ github.run_id }}
4747
path: ./dist/*.*
4848

49+
test_dist:
50+
needs: [build_dist]
51+
name: Test Distribution Files
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
with:
56+
fetch-depth: 0
57+
persist-credentials: false
58+
59+
- uses: actions/setup-python@v5
60+
with:
61+
# Build sdist on lowest supported Python
62+
python-version: '3.9'
63+
64+
- name: Download the dists
65+
uses: actions/download-artifact@v4
66+
with:
67+
name: dist-${{ github.run_id }}
68+
path: dist/
69+
70+
- name: Test the sdist
71+
run: |
72+
cd dist
73+
pip install *.tar.gz
74+
python -c "import flask_pymongo"
75+
pip uninstall -y flask_pymongo
76+
77+
- name: Test the wheel
78+
run: |
79+
cd dist
80+
pip install *.whl
81+
python -c "import flask_pymongo"
82+
pip uninstall -y flask_pymongo
83+
4984
publish:
5085
# 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]
86+
needs: [test_dist]
5287
if: startsWith(github.ref, 'refs/tags/')
5388
runs-on: ubuntu-latest
5489
environment: release

Diff for: .gitignore

-2
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/

Diff for: CHANGELOG.md

+4
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)