@@ -31,39 +31,74 @@ that changes the major version number.
31
31
Doing a Release
32
32
---------------
33
33
34
- 1. Test releases on Python 2.7 and 3.4+ on Windows, Linux and OSX,
35
- with and without the C extensions. It's generally enough to just run the
36
- tests on 2.7, 3.4 and the latest 3.x version with and without the
37
- extensions on a single platform, and then just test any version on the
38
- other platforms as a sanity check. ` python setup.py test ` will build the
39
- extensions and test. ` python tools/clean .py ` will remove the extensions,
40
- and then ` python setup.py --no_ext test ` will run the tests without
41
- them. You can also run the doctests: ` python setup.py doc -t ` .
42
-
43
- 2 . Add release notes to doc/changelog.rst. Generally just summarize/clarify
34
+ 1. PyMongo is tested on Evergreen. Ensure the latest commit are passing CI
35
+ as expected: https://evergreen.mongodb.com/waterfall/mongo-python-driver.
36
+ To test locally, `` python setup.py test `` will build the C extensions and
37
+ test. `` python tools/clean.py `` will remove the extensions,
38
+ and then `` python setup.py --no_ext test `` will run the tests without
39
+ them. You can also run the doctests: `` python setup .py doc -t ``.
40
+
41
+ 2. Check Jira to ensure all the tickets in this version have been completed .
42
+
43
+ 3 . Add release notes to doc/changelog.rst. Generally just summarize/clarify
44
44
the git log, but you might add some more long form notes for big changes.
45
45
46
- 3. Search and replace the "devN" version number w/ the new version number (see
47
- note above).
46
+ 4. Search and replace the "devN" version number w/ the new version number (see
47
+ note above in `Versioning `_).
48
+
49
+ 5. Make sure version number is updated in setup.py and pymongo/__init__.py
50
+
51
+ 6. Commit with a BUMP version_number message, eg ``git commit -m 'BUMP 3.11.0' ``.
52
+
53
+ 7. Tag w/ version_number, eg, ``git tag -a '3.11.0' -m '3.11.0' <COMMIT> ``.
48
54
49
- 4. Make sure version number is updated in setup.py and pymongo/__init__.py
55
+ 8. Push commit / tag, eg `` git push && git push --tags ``.
50
56
51
- 5. Commit with a BUMP version_number message.
57
+ 9. Pushing a tag will trigger a release process in Evergreen which builds
58
+ wheels and eggs for manylinux, macOS, and Windows. Wait for these jobs to
59
+ complete and then download the "Release files" archive from each task. See:
60
+ https://evergreen.mongodb.com/waterfall/mongo-python-driver?bv_filter=release
52
61
53
- 6. Tag w/ version_number
62
+ Unpack each downloaded archive so that we can upload the included files. For
63
+ the next steps let's assume we unpacked these files into the following paths::
54
64
55
- 7. Push commit / tag.
65
+ $ ls path/to/manylinux
66
+ pymongo-<version>-cp27-cp27m-manylinux1_i686.whl
67
+ ...
68
+ pymongo-<version>-cp38-cp38-manylinux2014_x86_64.whl
69
+ $ ls path/to/mac/
70
+ pymongo-<version>-cp27-cp27m-macosx_10_14_intel.whl
71
+ ...
72
+ pymongo-<version>-py2.7-macosx-10.14-intel.egg
73
+ $ ls path/to/windows/
74
+ pymongo-<version>-cp27-cp27m-win32.whl
75
+ ...
76
+ pymongo-<version>-cp38-cp38-win_amd64.whl
56
77
57
- 8. Push source to PyPI: ` python setup.py sdist upload `
78
+ 10. Build the source distribution::
58
79
59
- 9. Push binaries to PyPI; for each version of python and platform do:` python
60
- setup.py bdist_egg upload `. Probably best to do ` python setup.py bdist_egg `
61
- first, to make sure the egg builds properly. We also publish wheels.
62
- ` python setup.py bdist_wheel upload `.
80
+ $ git clone [email protected] :mongodb/mongo- python-driver.git
81
+ $ cd mongo- python-driver
82
+ $ git checkout "<release version number>"
83
+ $ python3 setup.py sdist
63
84
64
- 10. Make sure to push a build of the new docs (see the apidocs repo).
85
+ This will create the following distribution::
65
86
66
- 11. Bump the version number to <next version>.dev0 in setup.py/__init__.py,
87
+ $ ls dist
88
+ pymongo-<version>.tar.gz
89
+
90
+ 11. Upload all the release packages to PyPI with twine::
91
+
92
+ $ python3 -m twine upload dist/*.tar.gz path/to/manylinux/* path/to/mac/* path/to/windows/*
93
+
94
+ 12. Make sure the new version appears on https://pymongo.readthedocs.io/. If the
95
+ new version does not show up automatically, trigger a rebuild of "latest":
96
+ https://readthedocs.org/projects/pymongo/builds/
97
+
98
+ 13. Bump the version number to <next version>.dev0 in setup.py/__init__.py,
67
99
commit, push.
68
100
69
- 12. Announce!
101
+ 14. Publish the release version in Jira.
102
+
103
+ 15. Announce the release on:
104
+ https://developer.mongodb.com/community/forums/c/community/release-notes/
0 commit comments