» Changelog | PyPI | Issues | Source code | License
A standalone variant of distutils.version and packaging.version,
without anything else.
verlib is the implementation of PEP 386.
verlib2 is the implementation of PEP 440.
It also includes the original distutils.version implementation,
for those who need it going forward.
Everyone needs to compare versions, but no one wants to add packaging as a dependency.
distutils is deprecated, and Python 3.12 removed it from the standard library.
pip install verlib2from verlib2 import Version
assert Version("1.0.dev456") < Version("1!1.2.rev33+123456") Note: verlib2.Version provides packaging's Version, while
both implementations can be accessed like this:
from verlib2.distutils.version import LooseVersion, StrictVersion
from verlib2.packaging.version import VersionGreg Stein, Greg Ward, Donald Stufft, Tarek Ziadé, and all contributors to
distutilsversion, verlib, distutils, distutils2, packaging.version,
PEP-0386, PEP-0440, and most probably many more.
- https://peps.python.org/pep-0386/
- https://peps.python.org/pep-0440/
- http://bitbucket.org/tarek/distutilsversion/
- https://pypi.org/project/verlib/
- https://hg.python.org/distutils2
- https://github.com/pypa/packaging/blob/23.2/src/packaging/version.py
- numpy/numpy#21000
- https://github.com/numpy/numpy/blob/v1.26.0/numpy/_utils/_pep440.py
- crate/crate-python#513
- https://pypi.org/search/?q=pep440
- https://pypi.org/project/pep440/
- https://pypi.org/project/pep440deb/
- https://pypi.org/project/pep440nz/
- https://pypi.org/project/pep440-rs/
- https://pypi.org/project/pep440-utility/
- https://pypi.org/project/pep440-version-utils/
- https://pypi.org/project/version-utils/
Set up package in development mode.
python3 -m venv .venv
source .venv/bin/activate
pip install --editable='.[develop,test]'Run software tests.
poe check