-
Notifications
You must be signed in to change notification settings - Fork 248
Release PyPi Instruction
Andrei Novikov edited this page Aug 17, 2020
·
21 revisions
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 DOI link (README.rst, PKG-INFO.rst) 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_docs docs/<library_version>
$ git add docs/<library_version>/
$ git commit . -m "[docs] Upload documentation for library version <library_version>."
$ git push
- 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 x64
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> windows x86
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> macos x64
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> linux x64
$ python3 ci/cloud $CLOUD_TOKEN get_bin <release branch> linux x86
- 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