diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2009-01-14 16:54:04 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2009-01-14 16:54:04 +0000 |
commit | 46baa86c2eb0ffa70e7032815f3b512c6ff50252 (patch) | |
tree | a975701bc8f6f4cd771637b408008f04ffd94f1a /dev-python/pytz | |
parent | Remove old hardened-sources 2.6.25-r10, 2.6.26-r6 and 2.6.27-r2 (diff) | |
download | gentoo-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')
-rw-r--r-- | dev-python/pytz/ChangeLog | 10 | ||||
-rw-r--r-- | dev-python/pytz/files/pytz-2008i-zoneinfo.patch | 25 | ||||
-rw-r--r-- | dev-python/pytz/pytz-2008i.ebuild | 34 |
3 files changed, 67 insertions, 2 deletions
diff --git a/dev-python/pytz/ChangeLog b/dev-python/pytz/ChangeLog index 3e1e1da4afd1..29dfa37218ff 100644 --- a/dev-python/pytz/ChangeLog +++ b/dev-python/pytz/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/pytz -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pytz/ChangeLog,v 1.15 2008/07/25 19:08:47 bluebird Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pytz/ChangeLog,v 1.16 2009/01/14 16:54:04 bicatali Exp $ + +*pytz-2008i (14 Jan 2009) + + 14 Jan 2009; Sébastien Fabbro <bicatali@gentoo.org> + +files/pytz-2008i-zoneinfo.patch, +pytz-2008i.ebuild: + Version bump. Use timezone from sys-libs/timezone-data now 25 Jul 2008; Friedrich Oslage <bluebird@gentoo.org> pytz-2008a.ebuild: Add ~sparc keyword, bug #232008 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') + diff --git a/dev-python/pytz/pytz-2008i.ebuild b/dev-python/pytz/pytz-2008i.ebuild new file mode 100644 index 000000000000..bb3551d41af6 --- /dev/null +++ b/dev-python/pytz/pytz-2008i.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pytz/pytz-2008i.ebuild,v 1.1 2009/01/14 16:54:04 bicatali Exp $ + +NEED_PYTHON=2.3 +EAPI=2 +inherit eutils distutils + +DESCRIPTION="World Timezone Definitions for Python" +HOMEPAGE="http://pytz.sourceforge.net/" +SRC_URI="http://cheeseshop.python.org/packages/source/${PN:0:1}/${PN}/${P}.tar.bz2" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +DEPEND=">=sys-libs/timezone-data-${PV}" + +DOCS="CHANGES.txt" + +src_prepare() { + # use timezone-data zoneinfo + epatch "${FILESDIR}"/${P}-zoneinfo.patch +} + +src_test() { + PYTHONPATH=. "${python}" pytz/tests/test_tzinfo.py || die "test failed" +} + +src_install() { + distutils_src_install + rm -rf "${D}"/usr/lib*/python*/site-packages/pytz/zoneinfo +} |