Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1 KB

HOWTO-PyPi.md

File metadata and controls

63 lines (43 loc) · 1 KB

How to upload on PyPI

Here we use the twine tool to do the job, see Twine setup to add and configure it.

build archive and wheel

python setup.py sdist bdist_wheel

upload archive and wheel to PyPi test server

twine upload dist/pyModbusTCP-x.x.x* -r pypitest

Check result at https://test.pypi.org/project/pyModbusTCP/.

upload archive and wheel to PyPi server

twine upload dist/pyModbusTCP-x.x.x* -r pypi

Check result at https://pypi.python.org/project/pyModbusTCP/.

Twine setup

install twine

sudo pip install twine

create it's conf file

Create ~/.pypirc with credentials for pypi and pypitest.

cat <<EOT >> ~/.pypirc
[distutils]
index-servers =
  pypi
  pypitest

[pypi]
repository: https://upload.pypi.org/legacy/
username: __token__
password: mytoken

[pypitest]
repository: https://test.pypi.org/legacy/
username: __token__
password: mytoken
EOT

Update it with valid credentials.

nano ~/.pypirc