HOWTO RELEASE - RST
HOWTO RELEASE - RST
HOWTO RELEASE - RST
NumPy.
Source tree
-----------
- INSTALL.rst.txt
- release.sh
- pavement.py
NumPy Docs
----------
- https://github.com/numpy/numpy/blob/main/doc/HOWTO_RELEASE.rst.txt
SciPy.org wiki
--------------
- https://www.scipy.org/Installing_SciPy and links on that page.
Release Scripts
---------------
- https://github.com/numpy/numpy-vendor
OS X
----
OS X versions >= 10.9 are supported, for Python version support see
:ref:`NEP 29 <NEP29>`. We build binary wheels for
OSX that are compatible with Python.org Python, system Python, homebrew and
macports - see this `OSX wheel building summary
<https://github.com/MacPython/wiki/wiki/Spinning-wheels>`_ for details.
Windows
-------
We build 32- and 64-bit wheels on Windows. Windows 7, 8 and 10 are supported.
We build NumPy using the `mingw-w64 toolchain`_ on Appveyor.
Linux
-----
We build and ship `manylinux1 <https://www.python.org/dev/peps/pep-0513>`_
wheels for NumPy. Many Linux distributions include their own binary builds
of NumPy.
BSD / Solaris
-------------
No binaries are provided, but successful builds on Solaris and BSD have been
reported.
Tool chain
==========
We build all our wheels on cloud infrastructure - so this list of compilers is
for information and debugging builds locally. See the ``.travis.yml`` and
``appveyor.yml`` scripts in the `numpy wheels`_ repo for the definitive source
of the build recipes. Packages that are available using pip are noted.
Compilers
---------
The same gcc version is used as the one with which Python itself is built on
each platform. At the moment this means:
You will need Cython for building the binaries. Cython compiles the ``.pyx``
files in the NumPy distribution to ``.c`` files.
OpenBLAS
------------
All the wheels link to a version of OpenBLAS_ supplied via the openblas-libs_ repo.
The shared object (or DLL) is shipped with in the wheel, renamed to prevent name
collisions with other OpenBLAS shared objects that may exist in the filesystem.
.. _OpenBLAS: https://github.com/xianyi/OpenBLAS
.. _openblas-libs: https://github.com/MacPython/openblas-libs
Building docs
-------------
Building the documents requires a number of latex ``.sty`` files. Install them
all to avoid aggravation.
- Sphinx (pip)
- numpydoc (pip)
- Matplotlib
- Texlive (or MikTeX on Windows)
Uploading to PyPI
-----------------
- terryfy `<https://github.com/MacPython/terryfy>`_ (clone).
- beautifulsoup4 (pip)
- delocate (pip)
- auditwheel (pip)
- twine (pip)
- gitpython (pip)
- pygithub (pip)
Virtualenv
----------
Virtualenv is a very useful tool to keep several versions of packages around.
It is also used in the Paver script to build the docs.
What is released
================
Wheels
------
We currently support Python 3.6-3.8 on Windows, OSX, and Linux
Other
-----
- Release Notes
- Changelog
Source distribution
-------------------
We build source releases in both .zip and .tar.gz formats.
Release process
===============
.. note:: The following steps are repeated for the beta(s), release
candidates(s) and the final release.
Check deprecations
------------------
Before the release branch is made, it should be checked that all deprecated
code that should be removed is actually removed, and all new deprecations say
in the docstring or deprecation warning at what version the code will be
removed.
- numpy/core/setup_common.py
- numpy/core/code_generators/cversions.txt
- numpy/core/include/numpy/numpyconfig.h
If steps 1 and 2 are done correctly, compiling the release should not give
a warning "API mismatch detect at the beginning of the build".
Update the release notes with a Highlights section. Mention some of the
following:
.. _towncrier: https://pypi.org/project/towncrier/
::
git co 1b2e1d63ff # gives warning about detached head
RELEASE_NOTES = 'doc/release/1.7.0-notes.rst'
LOG_START = 'v1.6.0'
LOG_END = 'maintenance/1.7.x'
Do any other changes. When you are ready to release, do the following
changes::
diff --git a/setup.py b/setup.py
index b1f53e3..8b36dbe 100755
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,7 @@ PLATFORMS = ["Windows", "Linux", "Solaris", "Mac
OS-
MAJOR = 1
MINOR = 7
MICRO = 0
-ISRELEASED = False
+ISRELEASED = True
VERSION = '%d.%d.%drc1' % (MAJOR, MINOR, MICRO)
Now you can make the release commit and tag. We recommend you don't push
the commit or tag immediately, just in case you need to do more cleanup. We
prefer to defer the push of the tag until we're confident this is the exact
form of the released code (see: :ref:`push-tag-and-commit`):
The ``-s`` flag makes a PGP (usually GPG) signed tag. Please do sign the
release tags.
The release tag should have the release number in the annotation (tag
message). Unfortunately, the name of a tag can be changed without breaking the
signature, the contents of the message cannot.
To make your key more readily identifiable as you, consider sending your key
to public keyservers, with a command such as::
- ``azure/posix.yml``
- ``azure/windows.yml``.
In both cases, set the ``BUILD_COMMIT`` variable to the current release tag -
e.g. ``v1.19.0``::
Trigger a build by pushing a commit of your edits to the repository. Note that
you can do this on a branch, but it must be pushed upstream to the
``MacPython/numpy-wheels`` repository to trigger uploads since only
that repo has the appropriate tokens to allow uploads.
paver write_release
cd doc/
make dist
Update PyPI
-----------
The wheels and source should be uploaded to PyPI.
You should upload the wheels first, and the source formats last, to make sure
that pip users don't accidentally get a source install when they were
expecting a binary wheel.
The ``-v`` flag gives verbose feedback, ``-s`` causes the script to sign the
wheels with your GPG key before upload. Don't forget to upload the wheels
before the source tarball, so there is no period for which people switch from
an expected binary install to a source install from PyPI.
There are two ways to update the source release on PyPI, the first one is::
This will ask for your key PGP passphrase, in order to sign the built source
packages.
The second way is to upload the PKG_INFO file inside the sdist dir in the
web interface of PyPI. The source tarball can also be uploaded through this
interface.
.. _push-tag-and-commit:
Update scipy.org
----------------
A release announcement with a link to the download site should be placed in the
sidebar of the front page of scipy.org.
Update oldest-supported-numpy
-----------------------------
If this release is the first one to support a new Python version, or the first
to provide wheels for a new platform or PyPy version, the version pinnings
in https://github.com/scipy/oldest-supported-numpy should be updated.
Either submit a PR with changes to ``setup.cfg`` there, or open an issue with
info on needed changes.
Announce to the lists
---------------------
The release should be announced on the mailing lists of
NumPy and SciPy, to python-announce, and possibly also those of
Matplotlib, IPython and/or Pygame.
During the beta/RC phase, an explicit request for testing the binaries with
several other libraries (SciPy/Matplotlib/Pygame) should be posted on the
mailing list.
- Forward port changes in the release branch to release notes and release
scripts, if any, to main branch.
- Update the Milestones in Trac.