From e2c3fbb816d97de0398a04e607986efda56b13597d7e826f287057edf0a24d9f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 27 Dec 2022 17:40:09 +0000 Subject: [PATCH] Accepting request 1045363 from home:bnavigator:branches:devel:languages:python Required for python-jsonschema[format, format-nongpl] OBS-URL: https://build.opensuse.org/request/show/1045363 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-isoduration?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + isoduration-20.11.0-gh.tar.gz | 3 ++ python-isoduration.changes | 5 +++ python-isoduration.spec | 78 +++++++++++++++++++++++++++++++++++ 5 files changed, 110 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore 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/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc 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..5cf6a91 --- /dev/null +++ b/python-isoduration.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +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..fc65941 --- /dev/null +++ b/python-isoduration.spec @@ -0,0 +1,78 @@ +# +# spec file for package python-isoduration +# +# Copyright (c) 2022 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/ +# + + +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 wheel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module pip} +# 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