From eb1fb20400334aabda5afd8cd6e4d6f7975ece373f521d8e49a3c77624d4ad81 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 16 Mar 2017 19:59:53 +0000 Subject: [PATCH] Accepting request 480647 from home:tbechtold:branches:devel:languages:python - Switch to singlespec approach OBS-URL: https://build.opensuse.org/request/show/480647 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-iso8601?expand=0&rev=15 --- python-iso8601.changes | 5 +++++ python-iso8601.spec | 30 ++++++++++++++---------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/python-iso8601.changes b/python-iso8601.changes index b4aee04..0d93d39 100644 --- a/python-iso8601.changes +++ b/python-iso8601.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 16 14:45:48 UTC 2017 - tbechtold@suse.com + +- Switch to singlespec approach + ------------------------------------------------------------------- Mon Mar 14 13:49:16 UTC 2016 - tbechtold@suse.com diff --git a/python-iso8601.spec b/python-iso8601.spec index 611cc62..d0de143 100644 --- a/python-iso8601.spec +++ b/python-iso8601.spec @@ -1,7 +1,7 @@ # # spec file for package python-iso8601 # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-iso8601 Version: 0.1.11 Release: 0 @@ -25,16 +26,13 @@ License: MIT Group: Development/Languages/Python Source: iso8601-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-setuptools -# Test requirements: -BuildRequires: python-pytest >= 2.4.2 -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -Requires: python-argparse -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pytest >= 2.4.2} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros BuildArch: noarch -%endif + +%python_subpackages %description Simple module to parse ISO 8601 dates @@ -46,15 +44,15 @@ This module parses the most common forms of ISO 8601 date strings (e.g. %setup -q -n iso8601-%{version} %build -python setup.py build - -%check -py.test --verbose iso8601 +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -%files +%check +%python_exec %{_bindir}/py.test --verbose iso8601 + +%files %python_files %defattr(-,root,root,-) %doc README.rst LICENSE %{python_sitelib}/*