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
This commit is contained in:
Thomas Bechtold 2017-03-31 06:47:26 +00:00 committed by Git OBS Bridge
parent 0376d24c32
commit 3c872fbdba
2 changed files with 33 additions and 23 deletions

View File

@ -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 Wed Nov 9 07:56:09 UTC 2016 - tbechtold@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-python-dateutil # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,28 +17,30 @@
%define modname dateutil %define modname dateutil
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-python-%{modname} Name: python-python-%{modname}
Version: 2.6.0
Release: 0
Summary: A Python Datetime Library Summary: A Python Datetime Library
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Libraries/Python 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/ Url: https://dateutil.readthedocs.org/en/latest/
BuildRequires: python-devel Source0: https://pypi.io/packages/source/p/python-%{modname}/python-%{modname}-%{version}.tar.gz
BuildRequires: python-setuptools >= 18.0.1 BuildRequires: %{python_module devel}
BuildRequires: python-six >= 1.9.0 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 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} Provides: python-dateutil = %{version}
# Remove "=" of Obsoletes tag when upgrading %define oldpython python
Obsoletes: python-dateutil <= %{version} %ifpython2
Obsoletes: %{oldpython}-dateutil < %{version}
Provides: %{oldpython}-dateutil = %{version}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description %description
The python dateutil module provides powerful extensions to the standard The python dateutil module provides powerful extensions to the standard
@ -73,21 +75,22 @@ Orthodox or Julian algorithms.
%setup -q -n python-%{modname}-%{version} %setup -q -n python-%{modname}-%{version}
#cleanup and MSdos style end of line separators #cleanup and MSdos style end of line separators
sed -i 's/\r$//' LICENSE NEWS PKG-INFO README.rst sed -i 's/\r$//' LICENSE NEWS PKG-INFO README.rst
rm -f setup.cfg
%build %build
rm setup.cfg %python_build
CFLAGS="%{optflags}" python setup.py build
%install %install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} %python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%clean %check
rm -rf %{buildroot} %python_exec setup.py test
%files %files %{python_files}
%defattr(-,root,root) %defattr(-,root,root)
%doc LICENSE NEWS PKG-INFO README.rst %doc LICENSE NEWS PKG-INFO README.rst
%{python_sitelib}/%{modname}/ %{python_sitelib}/%{modname}/
%{python_sitelib}/python_%{modname}-%{version}-py%{py_ver}.egg-info/ %{python_sitelib}/python_%{modname}-%{version}-py%{python_version}.egg-info/
%changelog %changelog