Publishing packages
Now that we have the packages built, we need to actually publish them to PyPI. There are several different options we can use, but let’s discuss some optional package metadata first.
Adding URLs
Our setup.py
and setup.cfg
files already contained a url
parameter that will be used as the package homepage on PyPI. However, we can add more relevant URLs by configuring the project_urls
setting, which is an arbitrary map of name/URL pairs. For settings.py
:
setuptools.setup(
...
project_urls=dict(
docs='https://progressbar-2.readthedocs.io/',
),
)
Or for settings.cfg
:
[options]
project_urls=
docs=https://progressbar-2.readthedocs.io/
Similarly, for pyproject.toml
using poetry
:
[tool.poetry.urls]
docs='https://progressbar-2.readthedocs.io/'
PyPI trove classifiers
To increase the exposure of your package on PyPI, it can be useful to add a few classifiers. Some...