Version numbering for anarchists and software realists
Project description
looseversion - Version numbering for anarchists and software realists
A backwards/forwards-compatible fork of distutils.version.LooseVersion
,
for times when PEP-440 isn't what you need.
The goal of this package is to be a drop-in replacement for the original LooseVersion
.
It implements an identical interface and comparison logic to LooseVersion
.
The only major change is that a looseversion.LooseVersion
is comparable to a
distutils.version.LooseVersion
, which means tools should not need to worry whether
all dependencies that use LooseVersion have migrated.
If you are simply comparing versions of Python packages, consider moving to
packaging.version.Version,
which follows PEP-440.
LooseVersion
is better suited to interacting with heterogeneous version schemes that
do not follow PEP-440.
Installation
From PyPI
pip install looseversion
From source
git clone https://github.com/effigies/looseversion.git
pip install looseversion/
Usage
>>> from looseversion import LooseVersion
>>> LooseVersion("1.0.0") < LooseVersion("2.0.0")
True
>>> LooseVersion("1.0.0") < "2"
True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file looseversion-1.0.2.tar.gz
.
File metadata
- Download URL: looseversion-1.0.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b9f2e649eb81620c4527ba33ba87505eb69d4bb3f66523b34182a0450c294bc |
|
MD5 | 4c983791b078d86be6527cf957865dfa |
|
BLAKE2b-256 | 5bc86d304ae42f4088b66c1c94174831a1989659c0abe09d953e16ad43242ca7 |
File details
Details for the file looseversion-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: looseversion-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e38414e8e3f4a636084cecb910dc1ab88980289a06b1e5c57948b83becc7861c |
|
MD5 | 621087b1b1b0005353f29cc99682cff8 |
|
BLAKE2b-256 | 4170466273a3876394309e5890477a6fc51b83ed8624cc28b627de72a262d258 |