diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-05 04:41:10 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 04:41:10 +0000 |
| commit | e9271f977067eede919aff8b3bfd392124142680 (patch) | |
| tree | 63493371187821f5c4e2cb0a9fe43e8c7b60bb38 | |
| parent | bf6d004cf642b50c8b275515b15e77039907db0c (diff) | |
automatic import of python-versionsopeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-versions.spec | 635 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 637 insertions, 0 deletions
@@ -0,0 +1 @@ +/versions-1.3.0.tar.gz diff --git a/python-versions.spec b/python-versions.spec new file mode 100644 index 0000000..fad5320 --- /dev/null +++ b/python-versions.spec @@ -0,0 +1,635 @@ +%global _empty_manifest_terminate_build 0 +Name: python-versions +Version: 1.3.0 +Release: 1 +Summary: Parsing, inspecting and specifying versions. +License: MIT +URL: https://github.com/nekitdev/versions +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/62/87/70838a01ea0cdde1a8eecddb6ec4e1e1a3f9a89a874dbacc774294c12abb/versions-1.3.0.tar.gz +BuildArch: noarch + +Requires: python3-attrs +Requires: python3-typing-extensions + +%description +# `versions` + +[![License][License Badge]][License] +[![Version][Version Badge]][Package] +[![Downloads][Downloads Badge]][Package] +[![Discord][Discord Badge]][Discord] + +[![Documentation][Documentation Badge]][Documentation] +[![Check][Check Badge]][Actions] +[![Test][Test Badge]][Actions] +[![Coverage][Coverage Badge]][Coverage] + +> *Parsing, inspecting and specifying versions.* + +## Installing + +**Python 3.7 or above is required.** + +### pip + +Installing the library with `pip` is quite simple: + +```console +$ pip install versions +``` + +Alternatively, the library can be installed from source: + +```console +$ git clone https://github.com/nekitdev/versions.git +$ cd versions +$ python -m pip install . +``` + +### poetry + +You can add `versions` as a dependency with the following command: + +```console +$ poetry add versions +``` + +Or by directly specifying it in the configuration like so: + +```toml +[tool.poetry.dependencies] +versions = "^1.3.0" +``` + +Alternatively, you can add it directly from the source: + +```toml +[tool.poetry.dependencies.versions] +git = "https://github.com/nekitdev/versions.git" +``` + +## Examples + +### Versions + +[`parse_version`][versions.functions.parse_version] is used to parse versions: + +```python +from versions import parse_version + +version = parse_version("1.0.0-dev.1+build.1") + +print(version) # 1.0.0-dev.1+build.1 +``` + +### Segments + +All version segments can be fetched with their respective names: + +```python +>>> print(version.release) +1.0.0 +>>> version.release.parts +(1, 0, 0) +>>> print(version.dev) +dev.1 +>>> (version.dev.phase, version.dev.value) +("dev", 1) +>>> print(version.local) +build.1 +>>> version.local.parts +("build", 1) +``` + +### Comparison + +Versions support total ordering: + +```python +>>> v1 = parse_version("1.0.0") +>>> v2 = parse_version("2.0.0") +>>> v1 == v2 +False +>>> v1 != v2 +True +>>> v1 >= v2 +False +>>> v1 <= v2 +True +>>> v1 > v2 +False +>>> v1 < v2 +True +``` + +### Specification + +`versions` also supports specifying version requirements and matching version against them. + +Since versions support total ordering, they can be checked using version sets +(via [`parse_version_set`][versions.functions.parse_version_set]): + +```python +>>> from versions import parse_version, parse_version_set +>>> version_set = parse_version_set("^1.0.0") +>>> version_set +<VersionRange (>= 1.0.0, < 2.0.0)> +>>> version = parse_version("1.3.0") +>>> version +<Version (1.3.0)> +>>> version.matches(version_set) +True +>>> another = parse_version("2.2.0") +>>> another.matches(version_set) +False +``` + +## Documentation + +You can find the documentation [here][Documentation]. + +## Support + +If you need support with the library, you can send an [email][Email] +or refer to the official [Discord server][Discord]. + +## Changelog + +You can find the changelog [here][Changelog]. + +## Security Policy + +You can find the Security Policy of `versions` [here][Security]. + +## Contributing + +If you are interested in contributing to `versions`, make sure to take a look at the +[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct]. + +## License + +`versions` is licensed under the MIT License terms. See [License][License] for details. + +[Email]: mailto:support@nekit.dev + +[Discord]: https://nekit.dev/discord + +[Actions]: https://github.com/nekitdev/versions/actions + +[Changelog]: https://github.com/nekitdev/versions/blob/main/CHANGELOG.md +[Code of Conduct]: https://github.com/nekitdev/versions/blob/main/CODE_OF_CONDUCT.md +[Contributing Guide]: https://github.com/nekitdev/versions/blob/main/CONTRIBUTING.md +[Security]: https://github.com/nekitdev/versions/blob/main/SECURITY.md + +[License]: https://github.com/nekitdev/versions/blob/main/LICENSE + +[Package]: https://pypi.org/project/versions +[Coverage]: https://codecov.io/gh/nekitdev/versions +[Documentation]: https://nekitdev.github.io/versions + +[Discord Badge]: https://img.shields.io/badge/chat-discord-5865f2 +[License Badge]: https://img.shields.io/pypi/l/versions +[Version Badge]: https://img.shields.io/pypi/v/versions +[Downloads Badge]: https://img.shields.io/pypi/dm/versions + +[Documentation Badge]: https://github.com/nekitdev/versions/workflows/docs/badge.svg +[Check Badge]: https://github.com/nekitdev/versions/workflows/check/badge.svg +[Test Badge]: https://github.com/nekitdev/versions/workflows/test/badge.svg +[Coverage Badge]: https://codecov.io/gh/nekitdev/versions/branch/main/graph/badge.svg + +[versions.functions.parse_version]: https://nekitdev.github.io/versions/reference/functions#versions.functions.parse_version +[versions.functions.parse_version_set]: https://nekitdev.github.io/versions/reference/functions#versions.functions.parse_version_set + + +%package -n python3-versions +Summary: Parsing, inspecting and specifying versions. +Provides: python-versions +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-versions +# `versions` + +[![License][License Badge]][License] +[![Version][Version Badge]][Package] +[![Downloads][Downloads Badge]][Package] +[![Discord][Discord Badge]][Discord] + +[![Documentation][Documentation Badge]][Documentation] +[![Check][Check Badge]][Actions] +[![Test][Test Badge]][Actions] +[![Coverage][Coverage Badge]][Coverage] + +> *Parsing, inspecting and specifying versions.* + +## Installing + +**Python 3.7 or above is required.** + +### pip + +Installing the library with `pip` is quite simple: + +```console +$ pip install versions +``` + +Alternatively, the library can be installed from source: + +```console +$ git clone https://github.com/nekitdev/versions.git +$ cd versions +$ python -m pip install . +``` + +### poetry + +You can add `versions` as a dependency with the following command: + +```console +$ poetry add versions +``` + +Or by directly specifying it in the configuration like so: + +```toml +[tool.poetry.dependencies] +versions = "^1.3.0" +``` + +Alternatively, you can add it directly from the source: + +```toml +[tool.poetry.dependencies.versions] +git = "https://github.com/nekitdev/versions.git" +``` + +## Examples + +### Versions + +[`parse_version`][versions.functions.parse_version] is used to parse versions: + +```python +from versions import parse_version + +version = parse_version("1.0.0-dev.1+build.1") + +print(version) # 1.0.0-dev.1+build.1 +``` + +### Segments + +All version segments can be fetched with their respective names: + +```python +>>> print(version.release) +1.0.0 +>>> version.release.parts +(1, 0, 0) +>>> print(version.dev) +dev.1 +>>> (version.dev.phase, version.dev.value) +("dev", 1) +>>> print(version.local) +build.1 +>>> version.local.parts +("build", 1) +``` + +### Comparison + +Versions support total ordering: + +```python +>>> v1 = parse_version("1.0.0") +>>> v2 = parse_version("2.0.0") +>>> v1 == v2 +False +>>> v1 != v2 +True +>>> v1 >= v2 +False +>>> v1 <= v2 +True +>>> v1 > v2 +False +>>> v1 < v2 +True +``` + +### Specification + +`versions` also supports specifying version requirements and matching version against them. + +Since versions support total ordering, they can be checked using version sets +(via [`parse_version_set`][versions.functions.parse_version_set]): + +```python +>>> from versions import parse_version, parse_version_set +>>> version_set = parse_version_set("^1.0.0") +>>> version_set +<VersionRange (>= 1.0.0, < 2.0.0)> +>>> version = parse_version("1.3.0") +>>> version +<Version (1.3.0)> +>>> version.matches(version_set) +True +>>> another = parse_version("2.2.0") +>>> another.matches(version_set) +False +``` + +## Documentation + +You can find the documentation [here][Documentation]. + +## Support + +If you need support with the library, you can send an [email][Email] +or refer to the official [Discord server][Discord]. + +## Changelog + +You can find the changelog [here][Changelog]. + +## Security Policy + +You can find the Security Policy of `versions` [here][Security]. + +## Contributing + +If you are interested in contributing to `versions`, make sure to take a look at the +[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct]. + +## License + +`versions` is licensed under the MIT License terms. See [License][License] for details. + +[Email]: mailto:support@nekit.dev + +[Discord]: https://nekit.dev/discord + +[Actions]: https://github.com/nekitdev/versions/actions + +[Changelog]: https://github.com/nekitdev/versions/blob/main/CHANGELOG.md +[Code of Conduct]: https://github.com/nekitdev/versions/blob/main/CODE_OF_CONDUCT.md +[Contributing Guide]: https://github.com/nekitdev/versions/blob/main/CONTRIBUTING.md +[Security]: https://github.com/nekitdev/versions/blob/main/SECURITY.md + +[License]: https://github.com/nekitdev/versions/blob/main/LICENSE + +[Package]: https://pypi.org/project/versions +[Coverage]: https://codecov.io/gh/nekitdev/versions +[Documentation]: https://nekitdev.github.io/versions + +[Discord Badge]: https://img.shields.io/badge/chat-discord-5865f2 +[License Badge]: https://img.shields.io/pypi/l/versions +[Version Badge]: https://img.shields.io/pypi/v/versions +[Downloads Badge]: https://img.shields.io/pypi/dm/versions + +[Documentation Badge]: https://github.com/nekitdev/versions/workflows/docs/badge.svg +[Check Badge]: https://github.com/nekitdev/versions/workflows/check/badge.svg +[Test Badge]: https://github.com/nekitdev/versions/workflows/test/badge.svg +[Coverage Badge]: https://codecov.io/gh/nekitdev/versions/branch/main/graph/badge.svg + +[versions.functions.parse_version]: https://nekitdev.github.io/versions/reference/functions#versions.functions.parse_version +[versions.functions.parse_version_set]: https://nekitdev.github.io/versions/reference/functions#versions.functions.parse_version_set + + +%package help +Summary: Development documents and examples for versions +Provides: python3-versions-doc +%description help +# `versions` + +[![License][License Badge]][License] +[![Version][Version Badge]][Package] +[![Downloads][Downloads Badge]][Package] +[![Discord][Discord Badge]][Discord] + +[![Documentation][Documentation Badge]][Documentation] +[![Check][Check Badge]][Actions] +[![Test][Test Badge]][Actions] +[![Coverage][Coverage Badge]][Coverage] + +> *Parsing, inspecting and specifying versions.* + +## Installing + +**Python 3.7 or above is required.** + +### pip + +Installing the library with `pip` is quite simple: + +```console +$ pip install versions +``` + +Alternatively, the library can be installed from source: + +```console +$ git clone https://github.com/nekitdev/versions.git +$ cd versions +$ python -m pip install . +``` + +### poetry + +You can add `versions` as a dependency with the following command: + +```console +$ poetry add versions +``` + +Or by directly specifying it in the configuration like so: + +```toml +[tool.poetry.dependencies] +versions = "^1.3.0" +``` + +Alternatively, you can add it directly from the source: + +```toml +[tool.poetry.dependencies.versions] +git = "https://github.com/nekitdev/versions.git" +``` + +## Examples + +### Versions + +[`parse_version`][versions.functions.parse_version] is used to parse versions: + +```python +from versions import parse_version + +version = parse_version("1.0.0-dev.1+build.1") + +print(version) # 1.0.0-dev.1+build.1 +``` + +### Segments + +All version segments can be fetched with their respective names: + +```python +>>> print(version.release) +1.0.0 +>>> version.release.parts +(1, 0, 0) +>>> print(version.dev) +dev.1 +>>> (version.dev.phase, version.dev.value) +("dev", 1) +>>> print(version.local) +build.1 +>>> version.local.parts +("build", 1) +``` + +### Comparison + +Versions support total ordering: + +```python +>>> v1 = parse_version("1.0.0") +>>> v2 = parse_version("2.0.0") +>>> v1 == v2 +False +>>> v1 != v2 +True +>>> v1 >= v2 +False +>>> v1 <= v2 +True +>>> v1 > v2 +False +>>> v1 < v2 +True +``` + +### Specification + +`versions` also supports specifying version requirements and matching version against them. + +Since versions support total ordering, they can be checked using version sets +(via [`parse_version_set`][versions.functions.parse_version_set]): + +```python +>>> from versions import parse_version, parse_version_set +>>> version_set = parse_version_set("^1.0.0") +>>> version_set +<VersionRange (>= 1.0.0, < 2.0.0)> +>>> version = parse_version("1.3.0") +>>> version +<Version (1.3.0)> +>>> version.matches(version_set) +True +>>> another = parse_version("2.2.0") +>>> another.matches(version_set) +False +``` + +## Documentation + +You can find the documentation [here][Documentation]. + +## Support + +If you need support with the library, you can send an [email][Email] +or refer to the official [Discord server][Discord]. + +## Changelog + +You can find the changelog [here][Changelog]. + +## Security Policy + +You can find the Security Policy of `versions` [here][Security]. + +## Contributing + +If you are interested in contributing to `versions`, make sure to take a look at the +[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct]. + +## License + +`versions` is licensed under the MIT License terms. See [License][License] for details. + +[Email]: mailto:support@nekit.dev + +[Discord]: https://nekit.dev/discord + +[Actions]: https://github.com/nekitdev/versions/actions + +[Changelog]: https://github.com/nekitdev/versions/blob/main/CHANGELOG.md +[Code of Conduct]: https://github.com/nekitdev/versions/blob/main/CODE_OF_CONDUCT.md +[Contributing Guide]: https://github.com/nekitdev/versions/blob/main/CONTRIBUTING.md +[Security]: https://github.com/nekitdev/versions/blob/main/SECURITY.md + +[License]: https://github.com/nekitdev/versions/blob/main/LICENSE + +[Package]: https://pypi.org/project/versions +[Coverage]: https://codecov.io/gh/nekitdev/versions +[Documentation]: https://nekitdev.github.io/versions + +[Discord Badge]: https://img.shields.io/badge/chat-discord-5865f2 +[License Badge]: https://img.shields.io/pypi/l/versions +[Version Badge]: https://img.shields.io/pypi/v/versions +[Downloads Badge]: https://img.shields.io/pypi/dm/versions + +[Documentation Badge]: https://github.com/nekitdev/versions/workflows/docs/badge.svg +[Check Badge]: https://github.com/nekitdev/versions/workflows/check/badge.svg +[Test Badge]: https://github.com/nekitdev/versions/workflows/test/badge.svg +[Coverage Badge]: https://codecov.io/gh/nekitdev/versions/branch/main/graph/badge.svg + +[versions.functions.parse_version]: https://nekitdev.github.io/versions/reference/functions#versions.functions.parse_version +[versions.functions.parse_version_set]: https://nekitdev.github.io/versions/reference/functions#versions.functions.parse_version_set + + +%prep +%autosetup -n versions-1.3.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-versions -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3.0-1 +- Package Spec generated @@ -0,0 +1 @@ +18716482b54fabec54321fea1eb6658d versions-1.3.0.tar.gz |
