-
Notifications
You must be signed in to change notification settings - Fork 248
Release PyPi Instruction
Instruction to release pyclustering library to PyPi repository:
-
Create release branch using the following pattern
<version>
.<year>
.<year version>
.<optional minor version>
.rel
, for example,0.9.1.rel
or0.9.3.1.rel
. -
Check version in
setup.py
and update it if it is required. -
Check description
PKG-INFO.rst
and update it if it is required. -
Generate doxygen documentation and deploy it to github pages.
$ sudo apt-get install graphviz
$ sudo apt-get install texlive
$ doxygen docs/doxygen_conf_pyclustering
$ cd ../
$ mkdir pyclustering-website
$ cd pyclustering-website
$ git clone https://github.com/pyclustering/pyclustering.github.io.git .
$ cp -r ../pyclustering/doxygen_python_docs docs/<library_version>
$ git add docs/<library_version>/
$ git commit . -m "[docs] Upload documentation for library version <library_version>."
$ git push
-
Update the link to the documentation in
README.rst
andPKG-INFO.rst
. -
Create GitHub pyclustering release from the release branch sources (see step 1).
-
Update DOI description of the release on Zenodo.
-
Update DOI link (
README.rst
,PKG-INFO.rst
) and update it if it needed (not relevant step anymore). -
Add core binaries to the library from cloud. For that step token is required that can be obtained by following HTTP GET request:
https://oauth.yandex.ru/authorize?response_type=token&client_id=ID_YANDEX_APPLICATION
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> windows 64-bit
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> windows 32-bit
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> macos 64-bit
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> linux 32-bit
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> linux 64-bit
- Create pypi file description:
$ touch ~/.pypirc
$ nano ~/.pypirc
- Add following description:
[distutils]
index-servers=
testpypi
pypi
[testpypi]
repository = https://test.pypi.org/legacy/
username = <username>
password = <password>
[pypi]
repository = https://upload.pypi.org/legacy/
username = <username>
password = <password>
- Check setup file:
$ python3 setup.py check -r -s
- Create distributive:
$ python3 setup.py sdist
- Upload to test repository:
$ twine upload dist/* -r testpypi
- If everything is ok on test page then upload it to legacy:
$ twine upload dist/* -r pypi
- Upload
*.tar.gz
archive with binaries from pypi repository to github release.