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 pypa#322

Co-authored-by: Sviatoslav Sydorenko <webknjaz+github/[email protected]>
  • Loading branch information
OlenaYefymenko and webknjaz committed May 29, 2023
1 parent fb92e81 commit dc4879c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,16 @@ 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, if you need to use local version identifiers in your packages, you
can use a self-hosted package index such as ``devpi`` or other alternatives that allow local
versions. Local version identifiers must comply with `PEP 440`_.

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

0 comments on commit dc4879c

Please sign in to comment.