From 2cf039ee1ddc137eb73daa04a14acbc77b925b072f341b95a22ce9b43768eba3 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Tue, 11 Nov 2014 13:31:31 +0000
Subject: [PATCH 1/3] Accepting request 260849 from
home:namtrac:branches:devel:languages:python
- Update to pytz 2014.9
+ Database updated to 2014i
OBS-URL: https://build.opensuse.org/request/show/260849
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=26
---
python-pytz.changes | 6 ++++++
python-pytz.spec | 2 +-
pytz-2014.4.tar.bz2 | 3 ---
pytz-2014.9.tar.bz2 | 3 +++
4 files changed, 10 insertions(+), 4 deletions(-)
delete mode 100644 pytz-2014.4.tar.bz2
create mode 100644 pytz-2014.9.tar.bz2
diff --git a/python-pytz.changes b/python-pytz.changes
index 58acb9e..d09a1b4 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Tue Nov 11 11:47:38 UTC 2014 - idonmez@suse.com
+
+- Update to pytz 2014.9
+ + Database updated to 2014i
+
-------------------------------------------------------------------
Thu Jul 24 09:41:38 UTC 2014 - mcihar@suse.com
diff --git a/python-pytz.spec b/python-pytz.spec
index 16cd80d..c8d0004 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -17,7 +17,7 @@
Name: python-pytz
-Version: 2014.4
+Version: 2014.9
Release: 0
Summary: World timezone definitions, modern and historical
License: MIT
diff --git a/pytz-2014.4.tar.bz2 b/pytz-2014.4.tar.bz2
deleted file mode 100644
index 3118753..0000000
--- a/pytz-2014.4.tar.bz2
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a339a5ba846985bcf0a87782492458752b5d95b56ba219de4c9404c0ee5beec9
-size 159160
diff --git a/pytz-2014.9.tar.bz2 b/pytz-2014.9.tar.bz2
new file mode 100644
index 0000000..cb4c76a
--- /dev/null
+++ b/pytz-2014.9.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4ba0ab74fa7f34f77ff236ee2157454d1c2aaeaaa25932363bfa1be6cb82dbd6
+size 166230
From deee7ff03d1f882216150ddeeda8d53bf552659c506608018624c22282bdbffd Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Fri, 14 Nov 2014 15:27:07 +0000
Subject: [PATCH 2/3] Accepting request 261436 from
home:aplanas:branches:devel:languages:python
Use the system tz database.
OBS-URL: https://build.opensuse.org/request/show/261436
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=27
---
python-pytz.changes | 5 +++++
python-pytz.spec | 9 +++++++++
system_zoneinfo.patch | 44 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 58 insertions(+)
create mode 100644 system_zoneinfo.patch
diff --git a/python-pytz.changes b/python-pytz.changes
index d09a1b4..2f7aa73 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Nov 13 12:17:35 UTC 2014 - aplanas@suse.com
+
+- Use system tz database instead pytz one
+
-------------------------------------------------------------------
Tue Nov 11 11:47:38 UTC 2014 - idonmez@suse.com
diff --git a/python-pytz.spec b/python-pytz.spec
index c8d0004..d46a61a 100644
--- a/python-pytz.spec
+++ b/python-pytz.spec
@@ -26,9 +26,14 @@ Url: http://pytz.sourceforge.net
Source: http://pypi.python.org/packages/source/p/pytz/pytz-%{version}.tar.bz2
# 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: fdupes
BuildRequires: python-devel
BuildRequires: python-nose
+# Tests will use this package
+BuildRequires: timezone
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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()")}
@@ -53,6 +58,8 @@ Amost all of the Olson timezones are supported.
%setup -q -n pytz-%{version}
# Disable test which is not working (and documented so)
%patch0 -p1
+# Use system tz database
+%patch1 -p1
# For rpmlint warning: remove shebang from python library:
sed -i '/^#!/d' ./pytz/tzfile.py
@@ -61,6 +68,8 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+# Remove the pytz zoneinfo
+rm -fr %{buildroot}%{python_sitelib}/pytz/zoneinfo
%fdupes %{buildroot}%{python_sitelib}
%check
diff --git a/system_zoneinfo.patch b/system_zoneinfo.patch
new file mode 100644
index 0000000..7048c67
--- /dev/null
+++ b/system_zoneinfo.patch
@@ -0,0 +1,44 @@
+Index: pytz-2014.9/pytz/__init__.py
+===================================================================
+--- pytz-2014.9.orig/pytz/__init__.py
++++ pytz-2014.9/pytz/__init__.py
+@@ -25,11 +25,6 @@ __all__ = [
+
+ import sys, datetime, os.path, gettext
+
+-try:
+- from pkg_resources import resource_stream
+-except ImportError:
+- resource_stream = None
+-
+ from pytz.exceptions import AmbiguousTimeError
+ from pytz.exceptions import InvalidTimeError
+ from pytz.exceptions import NonExistentTimeError
+@@ -86,13 +81,7 @@ def open_resource(name):
+ for part in name_parts:
+ if part == os.path.pardir or os.path.sep in part:
+ raise ValueError('Bad path segment: %r' % part)
+- filename = os.path.join(os.path.dirname(__file__),
+- 'zoneinfo', *name_parts)
+- if not os.path.exists(filename) and resource_stream is not None:
+- # http://bugs.launchpad.net/bugs/383171 - we avoid using this
+- # unless absolutely necessary to help when a broken version of
+- # pkg_resources is installed.
+- return resource_stream(__name__, 'zoneinfo/' + name)
++ filename = os.path.join('/usr/share/zoneinfo', *name_parts)
+ return open(filename, 'rb')
+
+
+Index: pytz-2014.9/pytz/tzfile.py
+===================================================================
+--- pytz-2014.9.orig/pytz/tzfile.py
++++ pytz-2014.9/pytz/tzfile.py
+@@ -127,7 +127,7 @@ def build_tzinfo(zone, fp):
+ if __name__ == '__main__':
+ import os.path
+ from pprint import pprint
+- base = os.path.join(os.path.dirname(__file__), 'zoneinfo')
++ base = '/usr/share/zoneinfo'
+ tz = build_tzinfo('Australia/Melbourne',
+ open(os.path.join(base,'Australia','Melbourne'), 'rb'))
+ tz = build_tzinfo('US/Eastern',
From 1657c74f3b9874c50f91fc3b2572f61d4e8f4ae2f45e84fbbf00585ab2f11e18 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Fri, 14 Nov 2014 16:19:10 +0000
Subject: [PATCH 3/3] Accepting request 261669 from
home:posophe:branches:devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/261669
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=28
---
python-pytz.changes | 2 ++
1 file changed, 2 insertions(+)
diff --git a/python-pytz.changes b/python-pytz.changes
index 2f7aa73..2872fdb 100644
--- a/python-pytz.changes
+++ b/python-pytz.changes
@@ -2,6 +2,8 @@
Thu Nov 13 12:17:35 UTC 2014 - aplanas@suse.com
- Use system tz database instead pytz one
+ + Add system_zoneinfo.patch
+ + Add timezone requirement
-------------------------------------------------------------------
Tue Nov 11 11:47:38 UTC 2014 - idonmez@suse.com