mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00

This PR copies over the `pep440-rs` crate at commit `a8303b01ffef6fccfdce562a887f6b110d482ef3` with no modifications. It won't pass CI, but modifications will intentionally be confined to later PRs.
22 lines
534 B
Python
22 lines
534 B
Python
"""
|
|
A PEP440 reimplementation in rust
|
|
|
|
```python
|
|
from pep440_rs import Version, VersionSpecifier
|
|
|
|
|
|
assert Version("1.1a1").any_prerelease()
|
|
assert Version("1.1.dev2").any_prerelease()
|
|
assert not Version("1.1").any_prerelease()
|
|
assert VersionSpecifier(">=1.0").contains(Version("1.1a1"))
|
|
assert not VersionSpecifier(">=1.1").contains(Version("1.1a1"))
|
|
assert Version("2.0") in VersionSpecifier("==2")
|
|
```
|
|
|
|
"""
|
|
|
|
from ._pep440_rs import *
|
|
|
|
__doc__ = _pep440_rs.__doc__
|
|
if hasattr(_pep440_rs, "__all__"):
|
|
__all__ = _pep440_rs.__all__
|