root/tags/0.4.0/RELEASE.howto

Revision 86, 3.7 kB (checked in by lgs, 4 years ago)

Add a small release howto so I do not forget how to do it

Line 
1This is taken from:
2
3http://svn.zope.org/*checkout*/Sandbox/philikon/foundation/releasing-software.txt
4
5Releasing software
6------------------
7
8When releasing software, the following steps should be taken:
9
101. Make sure all automated tests of the package pass.
11
122. Fill in the release date in ``CHANGES.txt``.  Make sure the
13   changelog is complete.
14
153. Make sure the package metadata in ``setup.py`` is up-to-date.  You
16   can verify the information by re-generating the egg info::
17
18     python setup.py egg_info
19
20   and inspecting ``src/EGGNAME.egg-info/PKG-INFO``.  You should also
21   make sure the that the long description renders as valid
22   reStructuredText.  You can do this by using the ``rst2html.py``
23   utility from docutils_::
24
25     python setup.py --long-description | rst2html.py > test.html
26
27   If this will produce warnings or errors, PyPI will be unable to
28   render the long description nicely.  It will treat it as plain text
29   instead.
30
314. Create a release tag.
32
335. Get a separate checkout of the release tag for creating the
34   distribution tarball and eggs.  It is important that you don't do
35   this on the trunk or release branch to avoid
36
37   - forgetting to tag the release at all.
38
39   - forgetting to clean up the ``build`` directory that distutils and
40     setuptools create. Failure to do so may result in old artefacts
41     in eggs.
42
43   - forgetting to check in files that are needed by ``setup.py`` or
44     as package data.  Setuptools will only include them in the
45     distribution if they are checked into subversion.
46
47   In the checkout of the tag perform the following steps:
48
49   a) Remove the "dev" marker from the version in ``setup.py``
50
51   b) Commit these changes.  It's acceptable that these changes modify
52      the tag since they're purely related to release management.
53
54   c) Create a distribution and upload it to PyPI using the following
55      command::
56
57        python setup.py register sdist upload
58
59      If the package contains C extensions, you need to upload a
60      binary Windows egg as well::
61
62        python setup.py bdist_egg upload
63
64      This may require the help from someone with a Windows
65      installation and proper tools (Visual C).
66
67      Binary eggs for Linux or MacOSX should **never** be uploaded
68      because those platforms vary too much to be binary-compatible
69      with each other, due to varying UCS support, different libc
70      versions and linking models (framework / non-framework).
71
726. Back on the trunk or the release branch, increase the version
73   number in ``setup.py`` to the *next* release while preserving the
74   ``dev`` marker.  The convention is that the trunk or release branch
75   always points to the upcoming release, *not* the one that has been
76   released already.  So if you've just released version 3.4.1, you
77   should change ``setup.py`` to read::
78
79     setup(
80         name='...',
81         version='3.4.2dev',
82         ...
83         )
84
85   In ``CHANGES.txt`` add a *new* section for the upcoming release.
86   The release date for that should say "unreleased" so that
87   committers recording their changes won't accidentally put their
88   entry in the section for an already released version.  For
89   example::
90
91     3.4.2 (unreleased)
92     ------------------
93
94     * ...
95
96     3.4.1 (2007-01-24)
97     ------------------
98
99     * Fixed bug in the foo adapter.
100
101     * Added a bar utility for optimized kaboodling.
102
103     3.4.0 (2006-09-13)
104     ------------------
105
106     Initial release as separate egg.
107
108**Important:** Once released to PyPI or any other public download
109location, a released egg may *never* be removed, even if it has proven
110to be a faulty release ("brown bag release").  In such a case it
111should simply be superseded immediately by a new, improved release.
112
113.. _docutils: http://docutils.sourceforge.net/
Note: See TracBrowser for help on using the browser.