11On version numbers
22^^^^^^^^^^^^^^^^^^
33
4- The two version numbers (C++ and Python) must match when combined (checked when
5- you build the PyPI package), and must be a valid `PEP 440
6- <https://www.python.org/dev/peps/pep-0440> `_ version when combined.
4+ The version number must be a valid `PEP 440
5+ <https://www.python.org/dev/peps/pep-0440> `_ version number.
76
87For example:
98
109.. code-block :: C++
1110
1211 #define PYBIND11_VERSION_MAJOR X
1312 #define PYBIND11_VERSION_MINOR Y
14- #define PYBIND11_VERSION_PATCH Z.dev1
13+ #define PYBIND11_VERSION_PATCH Za0
1514
16- For beta, ``PYBIND11_VERSION_PATCH `` should be ``Z.b1 ``. RC's can be ``Z.rc1 ``.
17- Always include the dot (even though PEP 440 allows it to be dropped). For a
18- final release, this must be a simple integer. There is also
15+ For beta, ``PYBIND11_VERSION_PATCH `` should be ``Zb1 ``. RC's can be ``Zrc1 ``.
16+ For a final release, this must be a simple integer. There is also
1917``PYBIND11_VERSION_HEX `` just below that needs to be updated.
2018
2119
2220To release a new version of pybind11:
2321^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2422
2523If you don't have nox, you should either use ``pipx run nox `` instead, or use
26- ``pipx install nox `` or ``brew install nox `` (Unix).
24+ ``uv tool install nox ``, `` pipx install nox ``, or ``brew install nox `` (Unix).
2725
2826- Update the version number
2927
@@ -32,11 +30,9 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use
3230
3331 - Update ``PYBIND11_VERSION_HEX `` just below as well.
3432
35- - Update ``pybind11/_version.py `` (match above).
36-
3733 - Run ``nox -s tests_packaging `` to ensure this was done correctly.
3834
39- - Ensure that all the information in ``setup.cfg `` is up-to-date, like
35+ - Ensure that all the information in ``pyproject.toml `` is up-to-date, like
4036 supported Python versions.
4137
4238- Add release date in ``docs/changelog.md `` and integrate the output of
@@ -63,7 +59,7 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use
6359
6460 - ``git tag -a vX.Y.Z -m 'vX.Y.Z release' ``
6561
66- - ``grep ^__version__ pybind11/_version.py ``
62+ - ``git grep PYBIND11_VERSION include/ pybind11/detail/common.h ``
6763
6864 - Last-minute consistency check: same as tag?
6965
@@ -90,9 +86,9 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use
9086 click "Draft a new release" on the far right, fill in the tag name
9187 (if you didn't tag above, it will be made here), fill in a release name
9288 like "Version X.Y.Z", and copy-and-paste the markdown-formatted (!) changelog
93- into the description. You can remove line breaks and strip links to PRs and
94- issues, e.g. to a bare ``#1234 `` without the hyperlink markup. Check
95- "pre-release" if this is a beta/RC.
89+ into the description. You can remove line breaks and optionally strip links
90+ to PRs and issues, e.g. to a bare ``#1234 `` without the hyperlink markup.
91+ Check "pre-release" if this is an alpha/ beta/RC.
9692
9793 - CLI method: with ``gh `` installed, run ``gh release create vX.Y.Z -t "Version X.Y.Z" ``
9894 If this is a pre-release, add ``-p ``.
@@ -102,7 +98,7 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use
10298 - Make sure you are on master, not somewhere else: ``git checkout master ``
10399
104100 - Update version macros in ``include/pybind11/detail/common.h `` (set PATCH to
105- ``0.dev1 `` and increment MINOR).
101+ ``0a0 `` and increment MINOR).
106102
107103 - Update ``pybind11/_version.py `` to match.
108104
@@ -113,16 +109,10 @@ If you don't have nox, you should either use ``pipx run nox`` instead, or use
113109
114110 - ``git add ``, ``git commit ``, ``git push ``
115111
116- If a version branch is updated, remember to set PATCH to ``1.dev1 ``.
117-
118- If you'd like to bump homebrew, run:
119-
120- .. code-block :: console
121-
122- brew bump-formula-pr --url https://github.com/pybind/pybind11/archive/vX.Y.Z.tar.gz
112+ If a version branch is updated, remember to set PATCH to ``1a0 ``.
123113
124114Conda-forge should automatically make a PR in a few hours, and automatically
125- merge it if there are no issues.
115+ merge it if there are no issues. Homebrew should be automatic, too.
126116
127117
128118Manual packaging
@@ -137,6 +127,7 @@ this is the procedure:
137127.. code-block :: bash
138128
139129 nox -s build
130+ nox -s build_global
140131 twine upload dist/*
141132
142133 This makes SDists and wheels, and the final line uploads them.
0 commit comments