From 5f405accb3e9717f634da6ece506c93e0318085e6f53420d1afd793e6e32a99b Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Fri, 6 Sep 2024 10:43:58 +0000 Subject: [PATCH] - Add %{?sle15_python_module_pythons} OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-looseversion?expand=0&rev=5 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + 1.3.0.tar.gz | 3 ++ python-looseversion.changes | 19 +++++++++++ python-looseversion.spec | 64 +++++++++++++++++++++++++++++++++++++ 5 files changed, 110 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 1.3.0.tar.gz create mode 100644 python-looseversion.changes create mode 100644 python-looseversion.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/1.3.0.tar.gz b/1.3.0.tar.gz new file mode 100644 index 0000000..de6a240 --- /dev/null +++ b/1.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:862cb6c1649de54237a6a72c154252141a626ed83f826a9ae833c643ff9d5a1b +size 9214 diff --git a/python-looseversion.changes b/python-looseversion.changes new file mode 100644 index 0000000..f13d78e --- /dev/null +++ b/python-looseversion.changes @@ -0,0 +1,19 @@ +------------------------------------------------------------------- +Fri Sep 6 10:43:33 UTC 2024 - Daniel Garcia + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Thu Dec 7 22:42:07 UTC 2023 - Dirk Müller + +- update to 1.3.0: + * Restore Python 3 semantics for `LooseVersion`, creating + `LooseVersion2` to restore Python 2 semantics. + * Test on Python 3.12 + * Enable installation on Python 2+ + * Ensure consistent semantics between Python 2 and 3 + +------------------------------------------------------------------- +Fri Mar 17 16:08:00 UTC 2023 - Pablo Suárez Hernández + +- Initial package: looseversion 1.1.2 diff --git a/python-looseversion.spec b/python-looseversion.spec new file mode 100644 index 0000000..878b2f6 --- /dev/null +++ b/python-looseversion.spec @@ -0,0 +1,64 @@ +# +# spec file for package python-looseversion +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-looseversion +Version: 1.3.0 +Release: 0 +Summary: A backwards/forwards-compatible fork of distutils.version.LooseVersion +License: PSF-2.0 +Group: Development/Languages/Python +URL: https://github.com/effigies/looseversion +Source: https://github.com/effigies/looseversion/archive/refs/tags/%{version}.tar.gz +BuildRequires: %{python_module base > 3} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch + +%python_subpackages + +%description +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. + +%prep +%setup -q -n looseversion-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest -v tests.py + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitelib}/looseversion +%{python_sitelib}/looseversion-* + +%changelog