14
0
forked from pool/python-pytz

Accepting request 466178 from home:AndreasStieger:branches:devel:languages:python

update to 2016.10 bsc#1027705 and singlespec

OBS-URL: https://build.opensuse.org/request/show/466178
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=44
This commit is contained in:
Denisart Benjamin
2017-03-07 17:18:52 +00:00
committed by Git OBS Bridge
parent 52aad7b2c1
commit fc54993add
7 changed files with 38 additions and 71 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytz
#
# 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,24 +16,24 @@
#
%{?!python_module:%define python_module() python-%1 python3-%1}
Name: python-pytz
Version: 2016.4
Version: 2016.10
Release: 0
Summary: World timezone definitions, modern and historical
License: MIT
Group: Development/Languages/Python
Url: http://pytz.sourceforge.net
Source: https://pypi.python.org/packages/f4/7d/7c0c85e9c64a75dde11bc9d3e1adc4e09a42ce7cdb873baffa1598118709/pytz-2016.4.tar.bz2
Source2: https://pypi.python.org/packages/f4/7d/7c0c85e9c64a75dde11bc9d3e1adc4e09a42ce7cdb873baffa1598118709/pytz-2016.4.tar.bz2.asc
Source: https://pypi.python.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2
Source2: https://pypi.python.org/packages/d0/e1/aca6ef73a7bd322a7fc73fd99631ee3454d4fc67dc2bee463e2adf6bb3d3/pytz-2016.10.tar.bz2.asc
Source90: pytz.keyring
# PATCH-FIX-UPSTREAM fix-tests.patch -- Remote tests which are known to be broken
Patch0: fix-tests.patch
# PATCH-FEATURE-OPENSUSE -- Use system tz database (Olson database)
Patch1: system_zoneinfo.patch
Requires: timezone
BuildRequires: %{python_module devel}
BuildRequires: %{python_module nose}
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-nose
BuildRequires: python-rpm-macros
# Tests will use this package
BuildRequires: timezone
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -46,6 +46,8 @@ BuildArch: noarch
Provides: python-tz = 2014b
Obsoletes: python-tz < 2014b
%python_subpackages
%description
pytz - World Timezone Definitions for Python
pytz brings the Olson tz database into Python. This library allows
@@ -60,28 +62,24 @@ Amost all of the Olson timezones are supported.
%setup -q -n pytz-%{version}
# Disable test which is not working (and documented so)
%patch0 -p1
%if 0%{?suse_version} >= 1310
# Use system tz database
%patch1 -p1
%endif
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./pytz/tzfile.py
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
# Remove the pytz zoneinfo only if we use the system tz database
%if 0%{?suse_version} >= 1310
rm -fr %{buildroot}%{python_sitelib}/pytz/zoneinfo
%endif
%fdupes %{buildroot}%{python_sitelib}
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}
%check
nosetests
%{python_expand nosetests-%$python_bin_suffix}
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt
%{python_sitelib}/*