Skip to content

Commit aeb7035

Browse files
committed
Document release process
1 parent 599a510 commit aeb7035

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

RELEASING.rst

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
========================
2+
Publishing a new release
3+
========================
4+
5+
Based on https://packaging.python.org/en/latest/tutorials/packaging-projects
6+
7+
Prerequisites
8+
~~~~~~~~~~~~~
9+
10+
* Update `HISTORY.rst`
11+
* Tag Git release, e.g.::
12+
13+
$ git tag v1.2.3
14+
$ git push --tags
15+
16+
* If needed, create an account on TestPyPI: https://test.pypi.org/account/register/
17+
* Generate a test API token: https://test.pypi.org/manage/account/token/
18+
* Generate a real API token: https://pypi.org/manage/account/token/
19+
* Install deployment tools::
20+
21+
$ pip install --upgrade build twine
22+
23+
Process
24+
~~~~~~~
25+
26+
* Build the package::
27+
28+
$ python -m build
29+
30+
* Check package validity (optional)::
31+
32+
$ python -m twine check dist/*
33+
34+
* Upload the package to TestPyPI (username is `__token__`, password is your API token)::
35+
36+
$ python -m twine upload --repository testpypi dist/*
37+
38+
* Verify the test release can be installed::
39+
40+
$ python -m venv testing
41+
$ testing/bin/pip install --index-url https://test.pypi.org/simple/ --no-deps partridge==<VERSION>
42+
43+
Note: we use `--no-deps` because not all dependencies are present in
44+
TestPyPI. For more comprehensive testing, manually install deps from the real
45+
PyPI.
46+
47+
* Upload the package to PyPI (username is `__token__`, password is your API token)::
48+
49+
$ python -m twine upload dist/*

0 commit comments

Comments
 (0)