From a2646b10e0059a8ccd383de86ed440f7db3407ecae5ee9ea04e7b04641a40dc4 Mon Sep 17 00:00:00 2001 From: Todd R Date: Fri, 18 May 2018 15:30:58 +0000 Subject: [PATCH] Accepting request 610408 from devel:languages:python:misc Needed by python-agate. See request 605895 https://build.opensuse.org/request/show/605895 OBS-URL: https://build.opensuse.org/request/show/610408 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytimeparse?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + python-pytimeparse.changes | 12 ++++++ python-pytimeparse.spec | 82 ++++++++++++++++++++++++++++++++++++++ pytimeparse-1.1.7.tar.gz | 3 ++ 5 files changed, 121 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-pytimeparse.changes create mode 100644 python-pytimeparse.spec create mode 100644 pytimeparse-1.1.7.tar.gz 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/python-pytimeparse.changes b/python-pytimeparse.changes new file mode 100644 index 0000000..b755256 --- /dev/null +++ b/python-pytimeparse.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Wed Oct 18 16:47:05 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version +- Update to version 1.1.7 + * No changelog + +------------------------------------------------------------------- +Fri Dec 4 09:46:00 UTC 2015 - aplanas@suse.com + +- Initial package (version 1.1.5) + diff --git a/python-pytimeparse.spec b/python-pytimeparse.spec new file mode 100644 index 0000000..de2d757 --- /dev/null +++ b/python-pytimeparse.spec @@ -0,0 +1,82 @@ +# +# spec file for package python-pytimeparse +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# 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 http://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without test +Name: python-pytimeparse +Version: 1.1.7 +Release: 0 +Summary: Time expression parser +License: MIT +Group: Development/Languages/Python +Url: https://github.com/wroberts/pytimeparse +Source: https://files.pythonhosted.org/packages/source/p/pytimeparse/pytimeparse-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module nose} +%endif +BuildRequires: fdupes +BuildArch: noarch + +%python_subpackages + +%description +A small Python library to parse various kinds of time expressions, +inspired by a StackOverflow question. + +The single function pytimeparse.timeparse.timeparse defined in the +library (also available as pytimeparse.parse) parses time expressions +like the following: + + * 32m + * 2h32m + * 3d2h32m + * 1w3d2h32m + * 1w 3d 2h 32m + * 1 w 3 d 2 h 32 m + * ... + +It returns the time as a number of seconds (an integer value if +possible, otherwise a floating-point number) + +A number of seconds can be converted back into a string using the +datetime module in the standard library. + +%prep +%setup -q -n pytimeparse-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%if %{with test} +%check +%python_exec setup.py test +%endif + +%files %{python_files} +%defattr(-,root,root,-) +%doc README.rst +%{python_sitelib}/* + +%changelog diff --git a/pytimeparse-1.1.7.tar.gz b/pytimeparse-1.1.7.tar.gz new file mode 100644 index 0000000..9ce2874 --- /dev/null +++ b/pytimeparse-1.1.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51b641bcd435e0cb6b9701ed79cf7ee97fa6bf2dbb5d41baa16e5486e5d9b17a +size 9354