Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 8b71d3e

Browse files
author
ariddell
committed
doc: improve release howto and associated scripts
1 parent 336d7fa commit 8b71d3e

File tree

2 files changed

+49
-36
lines changed

2 files changed

+49
-36
lines changed

continuous_integration/download_wheels.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ MANYLINUX1_TAIL32="manylinux1_i686.whl"
1818
MANYLINUX1_TAIL64="manylinux1_x86_64.whl"
1919
MACOS_TAIL64="macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl"
2020

21-
mkdir -p wheels
22-
cd wheels
21+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
22+
mkdir -p "$DIR/../dist"
23+
pushd "$DIR/../dist" > /dev/null
2324
rm -rf *.whl
2425

2526
for py_tag in cp27; do
@@ -69,5 +70,5 @@ for py_tag in cp35 cp36; do
6970
curl -f -O $wheel_url
7071
done
7172

72-
cd ..
73-
echo "wheels have been downloaded into wheels/"
73+
popd
74+
echo "wheels have been downloaded into dist/"

doc/release-howto.rst

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
*The release signing key for PyStan was created on 2017-01-01 and has
88
fingerprint C3542448245BEC68F43070E4CCB669D9761F0CAC.*
99

10+
All steps except those described in "Tag Release" should be performed on a
11+
server with a high-bandwidth connection to the Internet. About 1000MiB worth of
12+
data will be uploaded to PyPi.
13+
14+
Tag Release
15+
===========
16+
1017
- Update release notes, ``doc/whats_new.rst``.
1118
- Double check version number in ``pystan/__init__.py``
1219
- Update version in snippet in ``doc/getting_started.rst``, i.e., "wget ..."
@@ -23,22 +30,15 @@ fingerprint C3542448245BEC68F43070E4CCB669D9761F0CAC.*
2330
- For example, ``git tag --sign v2.4.0.1``
2431
- Push tag to github ``git push --tags``
2532

26-
- Assemble source distribution::
27-
28-
./build_dist.sh
29-
30-
- Sign and upload source distribution::
33+
Build source distribution
34+
=========================
3135

32-
twine upload --sign --identity C3542448245BEC68F43070E4CCB669D9761F0CAC dist/*.tar.gz
36+
Assemble source distribution::
3337

34-
If ``twine`` prompts for a username and password abort the process with
35-
Control-C and enter your PyPI credentials in ``$HOME/.pypirc``. (For more
36-
details see the Python documention on `the .pypirc file
37-
<https://docs.python.org/3/distutils/packageindex.html#pypirc>`_.) Alternatively,
38-
one can set the environment variables ``TWINE_USERNAME`` and ``TWINE_PASSWORD``.
38+
./build_dist.sh
3939

4040
Build Wheels
41-
------------
41+
============
4242

4343
Linux and OSX: in the ``pystan-wheels`` repo update the ``pystan`` submodule
4444
and bump the version in ``.travis.yml``. Push changes.
@@ -56,31 +56,46 @@ After the wheels have finished building, download them from the Rackspace
5656
storage bucket.
5757

5858
Use ``continuous_integration/download_wheels.sh`` to download all wheels into
59-
the directory ``wheels/``.
59+
the directory ``dist/``.
6060

61-
Sign Wheels
62-
-----------
61+
Upload Source Distribution and Wheels to PyPI
62+
=============================================
6363

6464
*NOTE: EXPERIMENTAL*
6565

66-
As uploading wheels may take a long time on a low-bandwidth connection, it
67-
makes sense to sign all the wheels before uploading them::
66+
- Sign source distribution and wheels::
67+
68+
for tarball in dist/*.tar.gz; do
69+
gpg --detach-sign -a -u C3542448245BEC68F43070E4CCB669D9761F0CAC "$tarball"
70+
done
6871

69-
for whl in wheels/*.whl; do
72+
for whl in dist/*.whl; do
7073
gpg --detach-sign -a -u C3542448245BEC68F43070E4CCB669D9761F0CAC "$whl"
7174
done
7275

73-
Upload Wheels
74-
-------------
76+
- Upload source distribution and wheels::
7577

76-
*NOTE: EXPERIMENTAL*
78+
twine upload --skip-existing dist/*.tar.gz dist/*.tar.gz.asc
79+
twine upload --skip-existing dist/*.whl dist/*.whl.asc
7780

78-
At this point, all the wheels have been signed. They only need to be uploaded
79-
to PyPI.
81+
If ``twine`` prompts for a username and password abort the process with
82+
Control-C and enter your PyPI credentials in ``$HOME/.pypirc``. (For more
83+
details see the Python documention on `the .pypirc file
84+
<https://docs.python.org/3/distutils/packageindex.html#pypirc>`_.) Alternatively,
85+
one can set the environment variables ``TWINE_USERNAME`` and ``TWINE_PASSWORD``.
8086

81-
::
87+
Uploading wheels may take a long time on a low-bandwidth connection.
8288

83-
twine upload wheels/*.whl wheels/*.whl.asc
89+
Post-release Tasks
90+
==================
91+
92+
Update Source
93+
-------------
94+
95+
- Checkout the ``develop`` branch.
96+
- Update version in ``pystan/__init__.py`` to ``<n.n.n.n+1>dev``.
97+
- Add placeholder for next release in ``doc/whats_new.rst``.
98+
- Commit changes and push ``develop``.
8499

85100
Update Stan Website
86101
-------------------
@@ -90,7 +105,6 @@ number in the following file needs to be incremented::
90105

91106
https://github.com/stan-dev/stan-dev.github.io/blob/master/citations/index.md
92107

93-
94108
Make Release Announcement
95109
-------------------------
96110

@@ -105,10 +119,8 @@ PyStan 2.14.0.0 (subject is "pystan 2.14.0.0 released on PyPI")::
105119

106120
http://pystan.readthedocs.io/en/latest/whats_new.html
107121

108-
After release
109-
=============
110122

111-
- Checkout the ``develop`` branch.
112-
- Update version in ``pystan/__init__.py`` to ``<n.n.n.n>dev``.
113-
- Add placeholder for next release in ``doc/whats_new.rst``.
114-
- Commit changes and push ``develop``.
123+
TODO
124+
====
125+
126+
- Automate this entire process.

0 commit comments

Comments
 (0)