diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2022-07-20 11:27:55 +0200 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2022-07-20 11:28:13 +0200 |
commit | 78f738d7b06d9f4b39c055c396ebd76538f8c712 (patch) | |
tree | 1bfd5a83ff50b9b916ed1766e948de480f88b077 /README.md | |
parent | e59132d679481e9bdf7be1e3279793642470d2b9 (diff) | |
download | rsa-git-78f738d7b06d9f4b39c055c396ebd76538f8c712.tar.gz |
Add instructions on how to publish via Twine
Make the existing instructions more concrete by including a config file
example and the actual commands to install & run Twine.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -47,9 +47,28 @@ use this token when publishing instead of your username and password. As username, use `__token__`. As password, use the token itself, including the `pypi-` prefix. -See https://pypi.org/help/#apitoken for help using API tokens to publish. +See https://pypi.org/help/#apitoken for help using API tokens to publish. This is what I have in `~/.pypirc`: + +``` +[distutils] +index-servers = + rsa + +# Use `twine upload -r rsa` to upload with this token. +[rsa] + username = __token__ + password = pypi-token +``` ``` . ./.venv/bin/activate -poetry publish --build +pip install twine + +poetry build +twine check dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl +twine upload -r rsa dist/rsa-4.9.tar.gz dist/rsa-4.9-*.whl ``` + +The `pip install twine` is necessary as Python-RSA requires Python >= 3.6, and +Twine requires at least version 3.7. This means Poetry refuses to add it as +dependency. |