Skip to content

Commit 87bba1b

Browse files
committed
twine keyring support; document procedure in CONTRIBUTING
1 parent 019ae93 commit 87bba1b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CONTRIBUTING.rst

+9
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ on PyPI_, the following steps can be used to release a new version for
265265
#. Run ``tox -e publish -- --repository pypi`` and check that everything was
266266
uploaded to PyPI_ correctly.
267267

268+
.. tip::
269+
Instead of typing in the API key and username for uploading to PyPI each time,
270+
``twine`` allows us to configure ``keyring`` to store the credentials.
271+
Follow the `Keyring Support`_ guide for setting this up
272+
(``your-username`` should be set to ``__token__``).
273+
274+
**Linux users**: Additional setup is required. The steps to enable this
275+
can be vague, so run the following command: ``sudo apt-get install python-dbus``
268276

269277

270278
.. [#contrib1] Even though these resources focus on open source projects and
@@ -299,6 +307,7 @@ on PyPI_, the following steps can be used to release a new version for
299307
.. _git: https://git-scm.com
300308
.. _GitHub's fork and pull request workflow: https://guides.github.com/activities/forking/
301309
.. _guide created by FreeCodeCamp: https://github.com/FreeCodeCamp/how-to-contribute-to-open-source
310+
.. _Keyring Support: https://twine.readthedocs.io/en/stable/#keyring-support
302311
.. _Miniconda: https://docs.conda.io/en/latest/miniconda.html
303312
.. _MyST: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html
304313
.. _other kinds of contributions: https://opensource.guide/how-to-contribute

tox.ini

+5-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ passenv =
7676
TWINE_USERNAME
7777
TWINE_PASSWORD
7878
TWINE_REPOSITORY
79-
deps = twine
79+
DBUS_SESSION_BUS_ADDRESS
80+
deps =
81+
twine
82+
keyring
83+
dbus-python
8084
commands =
8185
python -m twine check dist/*
8286
python -m twine upload {posargs:--repository testpypi} dist/*

0 commit comments

Comments
 (0)