Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit ac4f36a

Browse files
committed
Add new docs section about release-process and document the package building and uploading using twine tool
1 parent 2a4c77d commit ac4f36a

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ The Community Guide
172172
testing
173173
development
174174
upgrading
175+
release-process
175176
release-notes
176177
authors
177178
license

docs/release-process.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Release process
2+
===============
3+
4+
This section describes the process and how a release is made of this package.
5+
6+
All steps for twine tool can be found here https://twine.readthedocs.io/en/latest/
7+
8+
9+
Install helper tools
10+
--------------------
11+
12+
We use the standard sdist package build solution to package the source dist and wheel package into the format that pip and pypi understands.
13+
14+
We then use `twine` as the helper tool to upload and interact with pypi to submit the package to both pypi & testpypi.
15+
16+
First create a new venv that uses at least python3.7 but it is recommended to use the latest python version always. Published releases will be built with python 3.9.0+
17+
18+
Install twine with
19+
20+
.. code-block::
21+
22+
pip install twine
23+
24+
25+
Build python package
26+
--------------------
27+
28+
First ensure that your `dist/` folder is empty so that you will not attempt to upload a dev version or other packages to the public index.
29+
30+
Create the source dist and wheel dist by running
31+
32+
.. code-block::
33+
34+
python setup.py sdist bdist_wheel
35+
36+
The built python pakages can be found in ´dist/`
37+
38+
39+
Submit to testpypi
40+
------------------
41+
42+
It is always good to test out the build first locally so there are no obvious code problems but also to submit the build to testpypi to verify that the upload works and that you get the version number and `README` section working correct.
43+
44+
To upload to `testpypi` run
45+
46+
.. code-block::
47+
48+
twine upload -r testpypi dist/*
49+
50+
It will upload everything to https://test.pypi.org/project/redis-py-cluster/
51+
52+
53+
Submit build to public pypi
54+
---------------------------
55+
56+
To submit the final package to public official pypi run
57+
58+
.. code-block::
59+
60+
twine upload dist/*

0 commit comments

Comments
 (0)