Fix: docutils/__init__.py __version_info__ must be changed manually
[docutils.git] / docutils / docs / dev / release.txt
blobee037d93551bce027d03a9aaa8790cf278269970
1 .. include:: ../header.txt
3 =============================
4  Docutils_ Release Procedure
5 =============================
7 :Authors: David Goodger; Lea Wiemann; open to all Docutils developers
8 :Contact: docutils-develop@lists.sourceforge.net
9 :Date: $Date$
10 :Revision: $Revision$
11 :Copyright: This document has been placed in the public domain.
13 .. _Docutils: https://docutils.sourceforge.io/
15 Steps to take and watch
16 -----------------------
18 * Make a clean checkout of svn.code.sf.net/p/docutils/code/trunk/docutils
19   to avoid having development files in the released packages.
21   Test, package and release this checkout.
23 * Announce the upcoming release on docutils-develop list.
25   Consider **feature freeze** or/and **check-in freeze** .
27 * Update RELEASE-NOTES.txt add section ``Release <version>``.
29   Consult HISTORY.txt for important changes.
31 * Change HISTORY.txt title ``Changes Since <previous release>`` to ``Release <version>``.
33 * Set new version (replace ``<version>`` with the new version indentifier
34   and ``<docutils-repository-root>`` with the dir containing
35   ``HISTORY.txt`` and ``RELEASE-NOTES.txt``)::
37       cd <docutils-repository-root>
38       ../sandbox/infrastructure/set_version.sh <version>
40   Check what was changed by ``set_version.sh``.
42   Change acchordingly docutils/__init__.py ::
44     __version_info__ = VersionInfo(
45         major=0,
46         minor=21,
47         micro=0,
48         releaselevel='candidate',  # one of 'alpha', 'beta', 'candidate', 'final'
49         serial=1,  # pre-release number (0 for final releases and snapshots)
50         release=False  # True for official releases and pre-releases
51         ) 
54   Run tests ::
56     export PYTHONWARNINGS=default
57     python3 test/alltests.py
59   or use tox.
60   In case of errors, clearing ``docutils/__pycache__`` may help.
62   ``export PYTHONWARNINGS=default`` prints DeprecationWarnings in python3.
64 * Generate wheel and source-distribution::
66     python3 -m pip install build
67     python3 -m build .
69 * check sdist for html-files in docutils.egg-info.
70 * Upload wheel and source to test.pypi::
72     python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
74   Test in venv. NOTE use --pre for prereleases::
76     python3 -m venv du3 ; cd du3
77     export PYTHONPATH= ; . bin/activate
79     python -m pip install --index-url https://test.pypi.org/simple/ --no-deps docutils
81     cp -Lr ../docutils-code/docutils/test .
82     python test/alltests.py
84     python -m pip uninstall docutils
85     deactivate ; cd .. ; rm -r du3
87 * Commit changes ... the changed version number.
89 * tag #.# (Note: only directory docutils is copied)::
91     svn copy svn+ssh://grubert@svn.code.sf.net/p/docutils/code/trunk/docutils \
92              svn+ssh://grubert@svn.code.sf.net/p/docutils/code/tags/docutils-#.# \
93              -m "tagging release #.#"
95 * Update your source directory.
96 * Rebuild wheel and source-distribution ::
98     python3 setup.py sdist
99     python3 setup.py bdist_wheel
101 * Now upload to pypi::
103     python3 -m twine upload  dist/docutils-#.#*
105 * Remove previous package from local cache::
107     find .cache/pip/wheels -name docutils\*whl -exec rm -v -i {} \;
109 * and test::
111     python3 -m venv du3 ; cd du3
112     export PYTHONPATH= ; . bin/activate
114     pip install --no-deps docutils
115     cp -Lr ../docutils-code/docutils/test .
116     python test/alltests.py
118     deactivate ; cd .. ; rm -r du3
120 * Notify to docutils-developer and user.
122 * upload source and generated html to sf-htdocs/#.# ::
124     mkdir tmp1
125     cd tmp1
126     tar xzvf ../dist/docutils-#.#.tar.gz
127     cd docutils-#.#/
128     python3 tools/buildhtml.py .
129     find . -name \*.pyc -exec rm -v {} \;
130     find . -name __pycache__ -exec rmdir -v {} \;
131     rm -r docutils.egg-info
132     rsync -e ssh -r -t ./ web.sourceforge.net:/home/project-web/docutils/htdocs/#.#
134 * Check web/index.txt for necessary corrections.
135 * Run sandbox/infrastructure/docutils-update.local to update web-content.
136 * Release to sourceforge.
138   - Upload docutils-#.#.tar.gz and release notes to sourceforge.
139   - Select docutils-#.#.tar.gz as default for all OS.
141 * set_version #.{#+1}b.dev
142 * test with py3
143 * docutils/HISTORY.txt: add title "Changes Since #.#"
144 * run sandbox/infrastructure/docutils-update.local
148    Local Variables:
149    mode: indented-text
150    indent-tabs-mode: nil
151    sentence-end-double-space: t
152    fill-column: 70
153    End: