Back to home page

EIC code displayed by LXR

 
 

    


Warning, /jana2/src/python/externals/pybind11-2.10.3/docs/release.rst is written in an unsupported language. File is not indexed.

0001 On version numbers
0002 ^^^^^^^^^^^^^^^^^^
0003 
0004 The two version numbers (C++ and Python) must match when combined (checked when
0005 you build the PyPI package), and must be a valid `PEP 440
0006 <https://www.python.org/dev/peps/pep-0440>`_ version when combined.
0007 
0008 For example:
0009 
0010 .. code-block:: C++
0011 
0012     #define PYBIND11_VERSION_MAJOR X
0013     #define PYBIND11_VERSION_MINOR Y
0014     #define PYBIND11_VERSION_PATCH Z.dev1
0015 
0016 For beta, ``PYBIND11_VERSION_PATCH`` should be ``Z.b1``. RC's can be ``Z.rc1``.
0017 Always include the dot (even though PEP 440 allows it to be dropped). For a
0018 final release, this must be a simple integer. There is also a HEX version of
0019 the version just below.
0020 
0021 
0022 To release a new version of pybind11:
0023 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0024 
0025 If you don't have nox, you should either use ``pipx run nox`` instead, or use
0026 ``pipx install nox`` or ``brew install nox`` (Unix).
0027 
0028 - Update the version number
0029     - Update ``PYBIND11_VERSION_MAJOR`` etc. in
0030       ``include/pybind11/detail/common.h``. PATCH should be a simple integer.
0031     - Update the version HEX just below, as well.
0032     - Update ``pybind11/_version.py`` (match above)
0033     - Run ``nox -s tests_packaging`` to ensure this was done correctly.
0034     - Ensure that all the information in ``setup.cfg`` is up-to-date, like
0035       supported Python versions.
0036     - Add release date in ``docs/changelog.rst``.
0037           - Check to make sure
0038             `needs-changelog <https://github.com/pybind/pybind11/pulls?q=is%3Apr+is%3Aclosed+label%3A%22needs+changelog%22>`_
0039             issues are entered in the changelog (clear the label when done).
0040     - ``git add`` and ``git commit``, ``git push``. **Ensure CI passes**. (If it
0041       fails due to a known flake issue, either ignore or restart CI.)
0042 - Add a release branch if this is a new minor version, or update the existing release branch if it is a patch version
0043     - New branch: ``git checkout -b vX.Y``, ``git push -u origin vX.Y``
0044     - Update branch: ``git checkout vX.Y``, ``git merge <release branch>``, ``git push``
0045 - Update tags (optional; if you skip this, the GitHub release makes a
0046     non-annotated tag for you)
0047     - ``git tag -a vX.Y.Z -m 'vX.Y.Z release'``.
0048     - ``git push --tags``.
0049 - Update stable
0050     - ``git checkout stable``
0051     - ``git merge master``
0052     - ``git push``
0053 - Make a GitHub release (this shows up in the UI, sends new release
0054   notifications to users watching releases, and also uploads PyPI packages).
0055   (Note: if you do not use an existing tag, this creates a new lightweight tag
0056   for you, so you could skip the above step.)
0057     - GUI method: Under `releases <https://github.com/pybind/pybind11/releases>`_
0058       click "Draft a new release" on the far right, fill in the tag name
0059       (if you didn't tag above, it will be made here), fill in a release name
0060       like "Version X.Y.Z", and copy-and-paste the markdown-formatted (!) changelog
0061       into the description (usually ``cat docs/changelog.rst | pandoc -f rst -t gfm``).
0062       Check "pre-release" if this is a beta/RC.
0063     - CLI method: with ``gh`` installed, run ``gh release create vX.Y.Z -t "Version X.Y.Z"``
0064       If this is a pre-release, add ``-p``.
0065 
0066 - Get back to work
0067     - Make sure you are on master, not somewhere else: ``git checkout master``
0068     - Update version macros in ``include/pybind11/detail/common.h`` (set PATCH to
0069       ``0.dev1`` and increment MINOR).
0070     - Update ``_version.py`` to match
0071     - Run ``nox -s tests_packaging`` to ensure this was done correctly.
0072     - Add a spot for in-development updates in ``docs/changelog.rst``.
0073     - ``git add``, ``git commit``, ``git push``
0074 
0075 If a version branch is updated, remember to set PATCH to ``1.dev1``.
0076 
0077 If you'd like to bump homebrew, run:
0078 
0079 .. code-block:: console
0080 
0081     brew bump-formula-pr --url https://github.com/pybind/pybind11/archive/vX.Y.Z.tar.gz
0082 
0083 Conda-forge should automatically make a PR in a few hours, and automatically
0084 merge it if there are no issues.
0085 
0086 
0087 Manual packaging
0088 ^^^^^^^^^^^^^^^^
0089 
0090 If you need to manually upload releases, you can download the releases from the job artifacts and upload them with twine. You can also make the files locally (not recommended in general, as your local directory is more likely to be "dirty" and SDists love picking up random unrelated/hidden files); this is the procedure:
0091 
0092 .. code-block:: bash
0093 
0094     nox -s build
0095     twine upload dist/*
0096 
0097 This makes SDists and wheels, and the final line uploads them.