1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
This file contains a walkthrough of the NumPy 1.12.0 release on Fedora Linux.
The commands can be copied into the command line, but be sure to
replace 1.12.0 by the correct version.
Release Walkthrough
====================
Building the release
--------------------
Checkout the branch for the release, make sure it is up to date, and clean the
repository::
$ git checkout maintenance/1.14.x
$ git pull upstream maintenance/1.14.x
$ git submodule update
$ git clean -xdf
Look at the git log to get the hash of the last commit in the release, then
check it out::
$ git log
$ git checkout 7849751173fb47a5f17761b3515b42b4d8ce1197
Edit pavement.py and setup.py as detailed in HOWTO_RELEASE::
$ gvim pavement.py setup.py
$ git commit -a -m"REL: NumPy 1.14.1 release."
Sanity check::
$ python runtests.py -m "full"
$ python3 runtests.py -m "full"
Tag it,and build the source distribution archives::
$ git tag -s v1.14.1
$ paver sdist # sdist will do a git clean -xdf, so we omit that
Check that the files in ``release/installers`` have the correct versions, then
push the tag upstream; generation of the wheels for PyPI needs it::
$ git push upstream v1.14.1
Trigger the wheels build. This can take a while. The numpy-wheels repository is
cloned from `<https://github.com/MacPython/numpy-wheels>`_. Start with a pull
as the repo may have been accessed and changed by someone else and a push will
fail.
$ cd ../numpy-wheels
$ git pull origin master
$ git branch <new version> # only when starting new numpy version
$ git checkout v1.14.x # v1.14.x already existed for the 1.14.1 release
The ``.travis.yml`` and ``appveyor.yml`` files need to be edited to make
sure they have the correct version, search for ``BUILD_COMMIT``.
$ gvim .travis.yml appveyor.yml
$ git commit -a
$ git push origin HEAD
Now wait. If you get nervous at the amount of time taken -- the builds can take
several hours-- you can check the build progress by following the links
provided at `<https://github.com/MacPython/numpy-wheels>`_ to check the travis
and appveyor build status. Check if all the needed wheels have been built and
uploaded before proceeding. There should currently be 22 of them at
`<https://wheels.scipy.org>`_, 4 for Mac, 8 for Windows, and 10 for Linux.
Download wheels
---------------
When the wheels have all been built, download them using the ``wheel-uploader``
in the ``terryfy`` repository. The terryfy repository may be cloned from
`<https://github.com/MacPython/terryfy>`_ if you don't already have it. The
wheels can also be uploaded using the ``wheel-uploader``, but we prefer to
download all the wheels to the ``../numpy/release/installers`` directory and
upload later using ``twine``.
$ cd ../terryfy
$ git pull origin master
$ CDN_URL=https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com
$ NPY_WHLS=../numpy/release/installers
$ ./wheel-uploader -u $CDN_URL -n -v -w $NPY_WHLS -t win numpy 1.14.1
$ ./wheel-uploader -u $CDN_URL -n -v -w $NPY_WHLS -t manylinux1 numpy 1.14.1
$ ./wheel-uploader -u $CDN_URL -n -v -w $NPY_WHLS -t macosx numpy 1.14.1
If you do this often, consider making CDN_URL and NPY_WHLS part of your default
environment.
Upload to PyPI
--------------
Upload to PyPI using ``twine``. The choice here is to sign the files, so will
need to sign every file separately when they are uploaded, keeping the gpg pass
phrase in the clipboard and pasting it in will make that easier. We may chose
to forgo the signing in the future::
$ cd ../numpy
$ twine upload -s release/installers/*.whl
$ twine upload -s release/installers/numpy-1.14.1.zip # Upload last.
If one of the commands breaks in the middle, which is not uncommon, you may
need to selectively upload the remaining files because PyPI does not allow the
same file to be uploaded twice. The source file should be uploaded last to
avoid synchronization problems if pip users access the files while this is in
process. Note that PyPI only allows a single source distribution, here we have
chosen the zip archive.
If this is not a final release, log into PyPI and hide the new directory while
making sure the last stable release is visible.
Upload files to github
----------------------
Generate the ``release/README`` files::
$ rm release/installers/*.asc
$ paver write_release_and_log
Go to `<https://github.com/numpy/numpy/releases>`_, there should be a ``v1.14.1
tag``, click on it and hit the edit button for that tag. There are two ways to
add files, using an editable text window and as binary uploads.
- Cut and paste the ``release/README.md`` file contents into the text window.
- Upload ``release/installers/numpy-1.12.0.tar.gz`` as a binary file.
- Upload ``release/installers/numpy-1.12.0.zip`` as a binary file.
- Upload ``release/README`` as a binary file.
- Upload ``doc/changelog/1.14.1-changelog.rst`` as a binary file.
- Check the pre-release button if this is a pre-releases.
- Hit the ``{Publish,Update} release`` button at the bottom.
Upload documents to docs.scipy.org
----------------------------------
This step is only needed for final releases and can be skipped for
pre-releases. You will also need upload permission for the document server, if
you do not have permission ping Pauli Virtanen or Ralf Gommers to generate and
upload the documentation. Otherwise::
$ pushd doc
$ make dist
$ make upload USERNAME=<yourname> RELEASE=v1.14.1
$ popd
If the release series is a new one, you will need to rebuild and upload the
``docs.scipy.org`` front page::
$ cd ../docs.scipy.org
$ gvim index.rst
Note: there is discussion about moving the docs to github. This section will be
updated when/if that happens.
Announce the release on scipy.org
---------------------------------
This assumes that you have forked `<https://github.com/scipy/scipy.org>`_::
$ cd ../scipy.org
$ git checkout master
$ git pull upstream master
$ git checkout -b numpy-1.14.1
$ gvim www/index.rst # edit the News section
$ git commit -a
$ git push origin HEAD
Now go to your fork and make a pull request for the branch.
Announce to mailing lists
-------------------------
The release should be announced on the numpy-discussion, scipy-devel,
scipy-user, and python-announce-list mailing lists. Look at previous
announcements for the basic template. The contributor list can be generated as
follows::
$ cd ../numpy
$ ./tools/changelog.py $GITHUB v1.14.0..v1.14.1 > tmp.rst
The contents of ``tmp.rst`` can then be cut and pasted into the announcement
email.
|