From 21967a2ac25af93fa2740c1f604a916b9d90d2782ae1b204f8561a6ba6133194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 21:07:58 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-isoduration revision 119503b2eb767b96bf311acd90e2e148 --- .gitattributes | 23 ++++++++++ isoduration-20.11.0-gh.tar.gz | 3 ++ python-isoduration.changes | 10 +++++ python-isoduration.spec | 79 +++++++++++++++++++++++++++++++++++ 4 files changed, 115 insertions(+) create mode 100644 .gitattributes create mode 100644 isoduration-20.11.0-gh.tar.gz create mode 100644 python-isoduration.changes create mode 100644 python-isoduration.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/isoduration-20.11.0-gh.tar.gz b/isoduration-20.11.0-gh.tar.gz new file mode 100644 index 0000000..68074f2 --- /dev/null +++ b/isoduration-20.11.0-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a72c92cfc3810117d2289792a39f17a0bf71a4065384ff117032fb5917e93e24 +size 15909 diff --git a/python-isoduration.changes b/python-isoduration.changes new file mode 100644 index 0000000..eab459e --- /dev/null +++ b/python-isoduration.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Fri Apr 21 12:27:10 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Mon Dec 26 11:33:20 UTC 2022 - Ben Greiner + +- Initial specfile for v20.11.0 +- Required for python-jsonschema[format, format-nongpl] diff --git a/python-isoduration.spec b/python-isoduration.spec new file mode 100644 index 0000000..6ea5b7b --- /dev/null +++ b/python-isoduration.spec @@ -0,0 +1,79 @@ +# +# spec file for package python-isoduration +# +# Copyright (c) 2023 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-isoduration +Version: 20.11.0 +Release: 0 +Summary: Operations with ISO 8601 durations +License: ISC +URL: https://github.com/bolsote/isoduration +Source: https://github.com/bolsote/isoduration/archive/refs/tags/%{version}.tar.gz#/isoduration-%{version}-gh.tar.gz +BuildRequires: %{python_module arrow >= 0.15.0} +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +# SECTION test +BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module isodate} +BuildRequires: %{python_module pytest-benchmark} +BuildRequires: %{python_module pytest} +# /SECTION +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-arrow >= 0.15.0 +BuildArch: noarch +%python_subpackages + +%description +ISO 8601 is most commonly known as a way to exchange datetimes in textual format. +A lesser known aspect of the standard is the representation of durations. They +have a shape similar to this: + + P3Y6M4DT12H30M5S + +This string represents a duration of 3 years, 6 months, 4 days, 12 hours, +30 minutes, and 5 seconds. + +The state of the art of ISO 8601 duration handling in Python is more or less +limited to what's offered by isodate. What we are trying to achieve here is to +address the shortcomings of isodate (as described in their own Limitations section), +and a few of our own annoyances with their interface, such as the lack of uniformity +in their handling of types, and the use of regular expressions for parsing. + +%prep +%setup -q -n isoduration-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%doc CHANGELOG README.md +%license LICENSE +%{python_sitelib}/isoduration +%{python_sitelib}/isoduration-%{version}.dist-info + +%changelog