summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2009-01-14 16:54:04 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2009-01-14 16:54:04 +0000
commit46baa86c2eb0ffa70e7032815f3b512c6ff50252 (patch)
treea975701bc8f6f4cd771637b408008f04ffd94f1a /dev-python/pytz/files
parentRemove old hardened-sources 2.6.25-r10, 2.6.26-r6 and 2.6.27-r2 (diff)
downloadgentoo-2-46baa86c2eb0ffa70e7032815f3b512c6ff50252.tar.gz
gentoo-2-46baa86c2eb0ffa70e7032815f3b512c6ff50252.tar.bz2
gentoo-2-46baa86c2eb0ffa70e7032815f3b512c6ff50252.zip
Version bump. Use timezone from sys-libs/timezone-data now
(Portage version: 2.2_rc20/cvs/Linux 2.6.25-gentoo-r7 x86_64)
Diffstat (limited to 'dev-python/pytz/files')
-rw-r--r--dev-python/pytz/files/pytz-2008i-zoneinfo.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/dev-python/pytz/files/pytz-2008i-zoneinfo.patch b/dev-python/pytz/files/pytz-2008i-zoneinfo.patch
new file mode 100644
index 000000000000..07f51b149365
--- /dev/null
+++ b/dev-python/pytz/files/pytz-2008i-zoneinfo.patch
@@ -0,0 +1,25 @@
+--- python-tz-2008i.orig/pytz/__init__.py
++++ python-tz-2008i/pytz/__init__.py
+@@ -49,15 +49,11 @@
+
+ Uses the pkg_resources module if available.
+ """
+- if resource_stream is not None:
+- return resource_stream(__name__, 'zoneinfo/' + name)
+- else:
+- name_parts = name.lstrip('/').split('/')
+- 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)
+- return open(filename, 'rb')
+-
++ # use the system zoninfo from timezone-data
++ name_parts = name.lstrip('/').split('/')
++ 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('/usr/share/zoneinfo', *name_parts)
++ return open(filename, 'rb')
+