verlib2


Nameverlib2 JSON
Version 0.3.1 PyPI version JSON
download
home_pageNone
SummaryA standalone variant of `distutils.version` and `packaging.version`, without anything else.
upload_time2025-02-11 20:04:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.6
licenseApache License 2.0
keywords distutils packaging version
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # verlib2

[![Tests](https://github.com/pyveci/verlib2/actions/workflows/main.yml/badge.svg)](https://github.com/pyveci/verlib2/actions/workflows/main.yml)
[![Test coverage](https://img.shields.io/codecov/c/gh/pyveci/verlib2.svg)](https://codecov.io/gh/pyveci/verlib2/)
[![Python versions](https://img.shields.io/pypi/pyversions/verlib2.svg)](https://pypi.org/project/verlib2/)

[![License](https://img.shields.io/github/license/pyveci/verlib2.svg)](https://github.com/pyveci/verlib2/blob/main/LICENSE)
[![Status](https://img.shields.io/pypi/status/verlib2.svg)](https://pypi.org/project/verlib2/)
[![PyPI](https://img.shields.io/pypi/v/verlib2.svg)](https://pypi.org/project/verlib2/)
[![Downloads](https://pepy.tech/badge/verlib2/month)](https://www.pepy.tech/projects/verlib2)


<!-- » [Documentation] -->

» [Changelog]
| [PyPI]
| [Issues]
| [Source code]
| [License]

[Changelog]: https://github.com/pyveci/verlib2/blob/main/CHANGES.md
[Documentation]: https://verlib2.readthedocs.io/
[Issues]: https://github.com/pyveci/verlib2/issues
[License]: https://github.com/pyveci/verlib2/blob/main/LICENSE
[PyPI]: https://pypi.org/project/verlib2/
[Source code]: https://github.com/pyveci/verlib2


## About

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.


## Rationale

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.


## Setup

```shell
pip install verlib2
```


## Usage
```python
from 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:
```python
from verlib2.distutils.version import LooseVersion, StrictVersion
from verlib2.packaging.version import Version
```


## Acknowledgements

Greg 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.


## Prior Art

- 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
- https://github.com/numpy/numpy/pull/21000
- https://github.com/numpy/numpy/blob/v1.26.0/numpy/_utils/_pep440.py
- https://github.com/crate/crate-python/pull/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/


## Development

Set up package in development mode.
```shell
python3 -m venv .venv
source .venv/bin/activate
pip install --editable='.[develop,test]'
```

Run software tests.
```shell
poe check
```



[verlib]: https://pypi.org/project/verlib/
[verlib2]: https://pypi.org/project/verlib2/
[PEP 386]: https://peps.python.org/pep-0386/
[PEP 440]: https://peps.python.org/pep-0440/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "verlib2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "Andreas Motl <andreas.motl@panodata.org>",
    "keywords": "distutils, packaging, version",
    "author": null,
    "author_email": "Donald Stufft <donald@stufft.io>",
    "download_url": "https://files.pythonhosted.org/packages/aa/d4/3009a8d0d8b6d5b9eb94a86d8adb9335ab67c61e9658c7fc1c9dcce61363/verlib2-0.3.1.tar.gz",
    "platform": null,
    "description": "# verlib2\n\n[![Tests](https://github.com/pyveci/verlib2/actions/workflows/main.yml/badge.svg)](https://github.com/pyveci/verlib2/actions/workflows/main.yml)\n[![Test coverage](https://img.shields.io/codecov/c/gh/pyveci/verlib2.svg)](https://codecov.io/gh/pyveci/verlib2/)\n[![Python versions](https://img.shields.io/pypi/pyversions/verlib2.svg)](https://pypi.org/project/verlib2/)\n\n[![License](https://img.shields.io/github/license/pyveci/verlib2.svg)](https://github.com/pyveci/verlib2/blob/main/LICENSE)\n[![Status](https://img.shields.io/pypi/status/verlib2.svg)](https://pypi.org/project/verlib2/)\n[![PyPI](https://img.shields.io/pypi/v/verlib2.svg)](https://pypi.org/project/verlib2/)\n[![Downloads](https://pepy.tech/badge/verlib2/month)](https://www.pepy.tech/projects/verlib2)\n\n\n<!-- \u00bb [Documentation] -->\n\n\u00bb [Changelog]\n| [PyPI]\n| [Issues]\n| [Source code]\n| [License]\n\n[Changelog]: https://github.com/pyveci/verlib2/blob/main/CHANGES.md\n[Documentation]: https://verlib2.readthedocs.io/\n[Issues]: https://github.com/pyveci/verlib2/issues\n[License]: https://github.com/pyveci/verlib2/blob/main/LICENSE\n[PyPI]: https://pypi.org/project/verlib2/\n[Source code]: https://github.com/pyveci/verlib2\n\n\n## About\n\nA standalone variant of `distutils.version` and `packaging.version`,\nwithout anything else.\n\n[verlib] is the implementation of [PEP 386].\n[verlib2] is the implementation of [PEP 440]. \nIt also includes the original `distutils.version` implementation,\nfor those who need it going forward.\n\n\n## Rationale\n\nEveryone needs to compare versions, but no one wants to add `packaging` as a dependency.\n`distutils` is deprecated, and Python 3.12 removed it from the standard library.\n\n\n## Setup\n\n```shell\npip install verlib2\n```\n\n\n## Usage\n```python\nfrom verlib2 import Version\n\nassert Version(\"1.0.dev456\") < Version(\"1!1.2.rev33+123456\") \n```\n\nNote: `verlib2.Version` provides packaging's `Version`, while\nboth implementations can be accessed like this:\n```python\nfrom verlib2.distutils.version import LooseVersion, StrictVersion\nfrom verlib2.packaging.version import Version\n```\n\n\n## Acknowledgements\n\nGreg Stein, Greg Ward, Donald Stufft, Tarek Ziad\u00e9, and all contributors to\n`distutilsversion`, `verlib`, `distutils`, `distutils2`, `packaging.version`,\nPEP-0386, PEP-0440, and most probably many more.\n\n\n## Prior Art\n\n- https://peps.python.org/pep-0386/\n- https://peps.python.org/pep-0440/\n- http://bitbucket.org/tarek/distutilsversion/\n- https://pypi.org/project/verlib/\n- https://hg.python.org/distutils2\n- https://github.com/pypa/packaging/blob/23.2/src/packaging/version.py\n- https://github.com/numpy/numpy/pull/21000\n- https://github.com/numpy/numpy/blob/v1.26.0/numpy/_utils/_pep440.py\n- https://github.com/crate/crate-python/pull/513\n- https://pypi.org/search/?q=pep440\n- https://pypi.org/project/pep440/\n- https://pypi.org/project/pep440deb/\n- https://pypi.org/project/pep440nz/\n- https://pypi.org/project/pep440-rs/\n- https://pypi.org/project/pep440-utility/\n- https://pypi.org/project/pep440-version-utils/\n- https://pypi.org/project/version-utils/\n\n\n## Development\n\nSet up package in development mode.\n```shell\npython3 -m venv .venv\nsource .venv/bin/activate\npip install --editable='.[develop,test]'\n```\n\nRun software tests.\n```shell\npoe check\n```\n\n\n\n[verlib]: https://pypi.org/project/verlib/\n[verlib2]: https://pypi.org/project/verlib2/\n[PEP 386]: https://peps.python.org/pep-0386/\n[PEP 440]: https://peps.python.org/pep-0440/\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "A standalone variant of `distutils.version` and `packaging.version`, without anything else.",
    "version": "0.3.1",
    "project_urls": {
        "Repository": "https://github.com/pyveci/verlib2"
    },
    "split_keywords": [
        "distutils",
        " packaging",
        " version"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e7a1b537ad58e042cb6d1223ae6d8dfa330396cfd9d4095491615ee21b2edae",
                "md5": "db80b4058728dd60aa7533b1f6f89fb8",
                "sha256": "cf8e2be044b834a2670f2d4c20a93cfc674933c0070543a6f61d531439cca200"
            },
            "downloads": -1,
            "filename": "verlib2-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db80b4058728dd60aa7533b1f6f89fb8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 14216,
            "upload_time": "2025-02-11T20:04:19",
            "upload_time_iso_8601": "2025-02-11T20:04:19.342458Z",
            "url": "https://files.pythonhosted.org/packages/4e/7a/1b537ad58e042cb6d1223ae6d8dfa330396cfd9d4095491615ee21b2edae/verlib2-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aad43009a8d0d8b6d5b9eb94a86d8adb9335ab67c61e9658c7fc1c9dcce61363",
                "md5": "5fefb8c9c20e9ba673bec70274d60f8c",
                "sha256": "2862f19528db400d130253a2b71c7c3616ee14e1d54bf6833bc0929d2cddd141"
            },
            "downloads": -1,
            "filename": "verlib2-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5fefb8c9c20e9ba673bec70274d60f8c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 15522,
            "upload_time": "2025-02-11T20:04:21",
            "upload_time_iso_8601": "2025-02-11T20:04:21.332231Z",
            "url": "https://files.pythonhosted.org/packages/aa/d4/3009a8d0d8b6d5b9eb94a86d8adb9335ab67c61e9658c7fc1c9dcce61363/verlib2-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-11 20:04:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pyveci",
    "github_project": "verlib2",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "verlib2"
}
        
Elapsed time: 0.66884s