Skip to content

Release PyPi Instruction

Andrei Novikov edited this page Sep 4, 2019 · 21 revisions

Instruction to release pyclustering library to PyPi repository:

  1. Check version in setup.py and update it if it is required.
  2. Check DOI link (README.rst, PKG-INFO.rst) and update it if it is required.
  3. Check description PKG-INFO.rst and update it if it is required.
  4. 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 commit . -m "[docs] Upload documentation for library version <library_version>."
$ git push
  1. Add core binaries to the library from cloud.
  2. Create pypi file description:
$ touch ~/.pypirc
$ nano ~/.pypirc
  1. 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>
  1. Check setup file:
$ python3 setup.py check -r -s
  1. Create distributive:
$ python3 setup.py sdist
  1. Upload to test repository:
$ twine upload dist/* -r testpypi
  1. If everything is ok on test page then upload it to legacy:
$ twine upload dist/* -r pypi
Clone this wiki locally