From ab71adbf43e8102a7bff270298ed934767edf15c485b8a7171fc489f1ce34aae Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Wed, 20 Sep 2017 10:06:02 +0000 Subject: [PATCH] Accepting request 527502 from home:ecsos:server - Convert to singlespec OBS-URL: https://build.opensuse.org/request/show/527502 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyRFC3339?expand=0&rev=3 --- python-pyRFC3339.changes | 5 +++++ python-pyRFC3339.spec | 31 +++++++++++++++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/python-pyRFC3339.changes b/python-pyRFC3339.changes index 3667f8c..11141e1 100644 --- a/python-pyRFC3339.changes +++ b/python-pyRFC3339.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Sep 20 09:39:52 UTC 2017 - ecsos@opensuse.org + +- Convert to singlespec + ------------------------------------------------------------------- Thu Dec 17 09:33:21 UTC 2015 - jweberhofer@weberhofer.at diff --git a/python-pyRFC3339.spec b/python-pyRFC3339.spec index b92d2ce..e6b49e6 100644 --- a/python-pyRFC3339.spec +++ b/python-pyRFC3339.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyRFC3339 # -# Copyright (c) 2015 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,11 +16,8 @@ # -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else -BuildArch: noarch -%endif +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + Name: python-pyRFC3339 Version: 1.0 Release: 0 @@ -29,12 +26,17 @@ License: MIT Group: Development/Languages/Python Url: https://github.com/kurtraschke/pyRFC3339 Source: https://pypi.python.org/packages/source/p/pyRFC3339/pyRFC3339-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-nose -BuildRequires: python-pytz -BuildRequires: python-setuptools +BuildRequires: %{python_module devel} +BuildRequires: %{python_module nose} +BuildRequires: %{python_module pytz} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-pytz BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch + +%python_subpackages %description pyRFC3339 parses and generates :RFC:`3339`-compliant timestamps using Python `datetime.datetime` objects. @@ -43,15 +45,16 @@ pyRFC3339 parses and generates :RFC:`3339`-compliant timestamps using Python `da %setup -q -n pyRFC3339-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib}/pyrfc3339 %check -python setup.py test +%python_exec setup.py test -%files +%files %{python_files} %defattr(-,root,root,-) %doc README.rst LICENSE.txt %{python_sitelib}/*