14
0

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
This commit is contained in:
Todd R
2018-05-18 15:30:58 +00:00
committed by Git OBS Bridge
commit a2646b10e0
5 changed files with 121 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

@@ -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)

82
python-pytimeparse.spec Normal file
View File

@@ -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

3
pytimeparse-1.1.7.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:51b641bcd435e0cb6b9701ed79cf7ee97fa6bf2dbb5d41baa16e5486e5d9b17a
size 9354