Skip to content

Commit

Permalink
Emphasize permitted version format in packages for publication
Browse files Browse the repository at this point in the history
The patch adds mention in README that local version identifiers in packages
don't allow publishing to PyPI/TestPyPI. Also, it suggests alternative local
servers for using local version identifiers.

Resolves #322

Co-authored-by: Sviatoslav Sydorenko <webknjaz+github/profile@redhat.com>
  • Loading branch information
OlenaYefymenko and webknjaz committed May 29, 2023
1 parent fb92e81 commit 6f3bfa6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ the tag.
For Git projects, the version relies on `git describe <https://git-scm.com/docs/git-describe>`_,
so you will see an additional ``g`` prepended to the ``{revision hash}``.

.. note::

According to `PEP 440 <https://peps.python.org/pep-0440/#local-version-identifiers>`_,
if a version includes a local component, the package cannot be published to public
package indexes like PyPI or TestPyPI. The disallowed version segments may
be seen in auto-publishing workflows or when a configuration mistake is made.

However, some package indexes such as devpi or other alternatives allow local
versions. Local version identifiers must comply with PEP 440_.

Semantic Versioning (SemVer)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 6f3bfa6

Please sign in to comment.