From 3c872fbdbadafe7d7c88758624c921de412161eaa421c1ad27589336e6b8cc90 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Fri, 31 Mar 2017 06:47:26 +0000 Subject: [PATCH] Accepting request 483324 from home:alois:branches:devel:languages:python OBS-URL: https://build.opensuse.org/request/show/483324 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-dateutil?expand=0&rev=7 --- python-python-dateutil.changes | 7 +++++ python-python-dateutil.spec | 49 ++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/python-python-dateutil.changes b/python-python-dateutil.changes index 64e7709..d1d9e76 100644 --- a/python-python-dateutil.changes +++ b/python-python-dateutil.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Mar 28 17:55:07 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec +- Enabled tests +- Spec cleanup + ------------------------------------------------------------------- Wed Nov 9 07:56:09 UTC 2016 - tbechtold@suse.com diff --git a/python-python-dateutil.spec b/python-python-dateutil.spec index def3725..c749720 100644 --- a/python-python-dateutil.spec +++ b/python-python-dateutil.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-dateutil # -# 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 @@ -17,28 +17,30 @@ %define modname dateutil +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-python-%{modname} +Version: 2.6.0 +Release: 0 Summary: A Python Datetime Library License: BSD-3-Clause Group: Development/Libraries/Python -Version: 2.6.0 -Release: 0 -Source0: https://pypi.io/packages/source/p/python-%{modname}/python-%{modname}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: https://dateutil.readthedocs.org/en/latest/ -BuildRequires: python-devel -BuildRequires: python-setuptools >= 18.0.1 -BuildRequires: python-six >= 1.9.0 +Source0: https://pypi.io/packages/source/p/python-%{modname}/python-%{modname}-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} >= 18.0.1 +BuildRequires: %{python_module six} >= 1.9.0 +BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-six >= 1.9.0 -%if 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 -%py_requires -%endif Provides: python-dateutil = %{version} -# Remove "=" of Obsoletes tag when upgrading -Obsoletes: python-dateutil <= %{version} +%define oldpython python +%ifpython2 +Obsoletes: %{oldpython}-dateutil < %{version} +Provides: %{oldpython}-dateutil = %{version} +%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildArch: noarch +%python_subpackages %description The python dateutil module provides powerful extensions to the standard @@ -73,21 +75,22 @@ Orthodox or Julian algorithms. %setup -q -n python-%{modname}-%{version} #cleanup and MSdos style end of line separators sed -i 's/\r$//' LICENSE NEWS PKG-INFO README.rst +rm -f setup.cfg %build -rm setup.cfg -CFLAGS="%{optflags}" python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} -%clean -rm -rf %{buildroot} +%check +%python_exec setup.py test -%files +%files %{python_files} %defattr(-,root,root) %doc LICENSE NEWS PKG-INFO README.rst %{python_sitelib}/%{modname}/ -%{python_sitelib}/python_%{modname}-%{version}-py%{py_ver}.egg-info/ +%{python_sitelib}/python_%{modname}-%{version}-py%{python_version}.egg-info/ %changelog