Metadata-Version: 2.1
Name: trivver
Version: 2.2.3
Summary: A library for comparing version strings
Project-URL: Homepage, https://devel.ringlet.net/devel/trivver/
Project-URL: Changelog, https://devel.ringlet.net/devel/trivver/changes/
Project-URL: Repository, https://gitlab.com/ppentchev/python-trivver
Author-email: Peter Pentchev <roam@ringlet.net>
License: BSD-2-Clause
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: DFSG approved
Classifier: License :: Freely Distributable
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.7
Description-Content-Type: text/markdown

<!--
SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
SPDX-License-Identifier: BSD-2-Clause
-->

# Compare package versions in all their varied glory.

\[[Home][ringlet] | [GitLab][gitlab] | [PyPI][pypi]\]

## Description

This module provides the `compare()` function which compares two
version strings and returns a negative value, zero, or a positive
value depending on whether the first string represents a version
number lower than, equal to, or higher than the second one, and
the `key_compare()` function which may be used as a key for e.g.
`sorted()`.

This module does not strive for completeness in the formats of
version strings that it supports. Some version strings sorted by
its rules are:

- 0.1.0
- 0.2.alpha
- 0.2
- 0.2.1
- 0.2a
- 0.2a.1
- 0.2a3
- 0.2a4
- 0.2p3
- 1.0~bpo3
- 1.0.beta
- 1.0.beta.2
- 1.0.beta2
- 1.0.beta3
- 1.0
- 1.0.4
- 1:0.3

See [the change log][changelog] (the `docs/changes.md` file in the source
distribution) for the history of `trivver` development.

## Contact

This module is [developed in a Gitlab repository][gitlab].
The author is [Peter Pentchev][roam].

[ringlet]: https://devel.ringlet.net/devel/trivver/ "The trivver homepage at Ringlet"
[gitlab]: https://gitlab.com/ppentchev/python-trivver "The trivver repository at GitLab"
[changelog]: https://gitlab.com/ppentchev/python-trivver/-/blob/master/docs/changes.md
[pypi]: https://pypi.org/project/trivver/ "The trivver page at PyPI"
[roam]: mailto:roam@ringlet.net "Peter Pentchev"
