summaryrefslogtreecommitdiff
path: root/dev-python/pytz
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/pytz')
-rw-r--r--dev-python/pytz/Manifest12
-rw-r--r--dev-python/pytz/files/2016.6.1-zoneinfo.patch12
-rw-r--r--dev-python/pytz/files/2018.4-zoneinfo.patch12
-rw-r--r--dev-python/pytz/files/pytz-2009h-zoneinfo-noinstall.patch32
-rw-r--r--dev-python/pytz/files/pytz-2009j-zoneinfo.patch14
-rw-r--r--dev-python/pytz/files/pytz-2018.4-zoneinfo-noinstall.patch18
-rw-r--r--dev-python/pytz/metadata.xml19
-rw-r--r--dev-python/pytz/pytz-2016.3.ebuild34
-rw-r--r--dev-python/pytz/pytz-2017.2.ebuild35
-rw-r--r--dev-python/pytz/pytz-2018.4.ebuild35
10 files changed, 223 insertions, 0 deletions
diff --git a/dev-python/pytz/Manifest b/dev-python/pytz/Manifest
new file mode 100644
index 000000000000..405035e4cb60
--- /dev/null
+++ b/dev-python/pytz/Manifest
@@ -0,0 +1,12 @@
+AUX 2016.6.1-zoneinfo.patch 569 BLAKE2B a4cb4ae2bd6953f8f315bb0c444bd083d3431d85128fb9d0ab3c97ad3679114a5f0ce13afcde65070d8bad0fc586b893260b30ccfe793bba6be26f85e9e08b22 SHA512 d1b2bf717c8099eb5cfbe353d50eb034ed321303f6430c0f4183dd84a64780157615b29b7aaf7c04eb8fe69e48c039e479f22f70f713b2aa5e907ae371c8ba01
+AUX 2018.4-zoneinfo.patch 549 BLAKE2B 5654ac8133627afaf9dc17dd9ae8e6a22ef9206efc6ca88495bfdec0078fc77a290ab7a62d6d1aa722ac01b9428bf37382d5f19d9da65593aed43354d05ceeec SHA512 eb365950d2eb62c8d984146228c7d96fca96b2ab4ea90b951a85b3f450550451e6c014da21e403476435e71c5ae989f169d21e07c56fab9713dacec0aee3184f
+AUX pytz-2009h-zoneinfo-noinstall.patch 957 BLAKE2B aec135326ab00e0287fc1c57ca745bc113ab8f0564d7328e82ed00cb024ad8a5008dcac4a7f580967672e996e861bc994fd307de7aee7e55f5e8623fe64844c5 SHA512 142d3ac58be3fffc35e2dc1f70ee988a7c9ebec51518d15bee9d36f4d4a08178840fa4d73f9734e92192c3633e517f525a9d583f7b5dc754af83f7c9536bd446
+AUX pytz-2009j-zoneinfo.patch 651 BLAKE2B 9e0f5d4f037691ee02809ae46887d6f4f5a390e95f670d604a6525b9b68ba4b1743ed34a8c0c05b70f436e2023bc0c9326a6a9fa46ac3ce87eb9438adcdb60b2 SHA512 228d3c59e3e0b5b0b3b80f5b0b6e947815d11191fd5523d17420dde6cea488bc544c05b552619934c4ca72c30ebefd042114abfea6c72f03710e96a776f39038
+AUX pytz-2018.4-zoneinfo-noinstall.patch 579 BLAKE2B 1d21d01160dbdf6c6848c2c0088cbc6ca326270b106098ce7157b363acf6f4da750a58498be95a8b5bf1ee342b679fdbbf16cf9d542d5f46088062db83f866f7 SHA512 309c2427f5a8ebb77bdf899ad3fb34029c46901cbaf2baf3ab697b83608dd1d3c6e7cf776b1b9b592918b91cbafd148ee3e4c0b4255f38ea3e41c0bca94f4c51
+DIST pytz-2016.3.tar.bz2 170906 BLAKE2B ae1c5336919cd60d643afcaec8889793092da1b16c6cf6ccab7816bb7169b5bd8abd9180e4571682fbc077e11786dbea14dcb6457291f5285cd9898ea84efccb SHA512 8d91a84500257327361a8ccd19ce2d2e5848c10c7d4105ec1be012be592ec38113611558c7894c1825cc1967303901fce35079fc799cc10e84216864cd00266f
+DIST pytz-2017.2.zip 502168 BLAKE2B a1e02967700d0624d2c48bcedde52b772471aefcb1dc173fc067045a69d808dc8208ef300d67c683b0d49a0b19b6c22f9d5512a6a10559457e19a508e4b40ace SHA512 d67d64a64b4c21e0bd41da56020fc7b016aec9da7f3243f79b65704119f70b8a9cd4f5f905631b6761e06ecef93830e5e479e16c7b1611ac70e0cd2b39d5b916
+DIST pytz-2018.4.tar.gz 308066 BLAKE2B 665cebc5b535aafc92a1858b718d22818810534d8680a82ef3a0b66e6092f24226c36eb74feb690e25578b4d6ab8288cc4825eb5fb793345e11b0e71c6041868 SHA512 8a15e64d0d1a4b75c1e92360b22c06a41a692fe54fc8bfcff8cfa671095232d87f7929240441cd4d46826cd13f21d348125509c899be5a0b19bc7a77fdcb43c1
+EBUILD pytz-2016.3.ebuild 1005 BLAKE2B ea6435f49fee328a671e0e0c34256634daed5a76f4a7d9833de852c02eec0c08a5b4aa44a6310510d5aa6610b647c2bc609e8e1174843dce4a76eed9dd34d6a3 SHA512 3c96fc10d3a065e4e5073100583d8596d0641e76260623f714b5101a47a01222b10188bb1d80de3c3688f17bcc2b7f6a79fe15c81c97052ea8a693720a6042b8
+EBUILD pytz-2017.2.ebuild 1025 BLAKE2B f0ab3840ce36de0bc3a9c9e600230e038fc12efc726e4363a587dd064c0ca616f2081998bc9c7643bfaf1e2bcf3b3043f09d873e4e60be7a3f49e7030d772888 SHA512 27961b6a7b117f4a66a4c29bdf640e5ecf39f8ca3e70288d4379b689943672f32b193297a960ac83616e4f951ca999cf4cc0224e407d0441a83fb254f9fdd309
+EBUILD pytz-2018.4.ebuild 1032 BLAKE2B 379d13968e5fe4765e6cc8f9f2e7d3548c871827a0da44fa33d1872ac6aede5da1c4e2fec166d8a44704d085e1962d28fa43736a64c1ac64d900b13aeff1654c SHA512 5b305ffef1bfa8df3519ebe67d08c26d282f18cfd1897424a38edceb741137ad72b2e7a197833d19d253808d4401e6b066721ab1781e1c1409ee149522f00fba
+MISC metadata.xml 739 BLAKE2B d96611c8cdfc1d45fa86eabcbcc60ed1d3f7e7d2a358a2fc5cf54a64ac3427140299651263e0be1cc4d2f87750df81c4adac9512be75ab334d38f44a375238ea SHA512 b7c9e6ea1b5bd128f1c5ce0a77171d0b7cdbb6f8ffb186d92aa4167d2d84c60c28c647cae66ffc7532350bca13ab65aaab5eb441f68321fc786a14b90f8813e8
diff --git a/dev-python/pytz/files/2016.6.1-zoneinfo.patch b/dev-python/pytz/files/2016.6.1-zoneinfo.patch
new file mode 100644
index 000000000000..d8223da436cf
--- /dev/null
+++ b/dev-python/pytz/files/2016.6.1-zoneinfo.patch
@@ -0,0 +1,12 @@
+--- a/pytz/__init__.py
++++ b/pytz/__init__.py
+@@ -81,8 +81,7 @@
+ 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)
++ filename = os.path.join('/usr/share/zoneinfo', *name_parts)
+ if not os.path.exists(filename):
+ # http://bugs.launchpad.net/bugs/383171 - we avoid using this
+ # unless absolutely necessary to help when a broken version of
diff --git a/dev-python/pytz/files/2018.4-zoneinfo.patch b/dev-python/pytz/files/2018.4-zoneinfo.patch
new file mode 100644
index 000000000000..2eeeab416d7f
--- /dev/null
+++ b/dev-python/pytz/files/2018.4-zoneinfo.patch
@@ -0,0 +1,12 @@
+--- a/pytz/__init__.py
++++ b/pytz/__init__.py
+@@ -91,8 +91,7 @@
+ if zoneinfo_dir is not None:
+ filename = os.path.join(zoneinfo_dir, *name_parts)
+ else:
+- filename = os.path.join(os.path.dirname(__file__),
+- 'zoneinfo', *name_parts)
++ filename = os.path.join('/usr/share/zoneinfo', *name_parts)
+ if not os.path.exists(filename):
+ # http://bugs.launchpad.net/bugs/383171 - we avoid using this
+ # unless absolutely necessary to help when a broken version of
diff --git a/dev-python/pytz/files/pytz-2009h-zoneinfo-noinstall.patch b/dev-python/pytz/files/pytz-2009h-zoneinfo-noinstall.patch
new file mode 100644
index 000000000000..2e9709579883
--- /dev/null
+++ b/dev-python/pytz/files/pytz-2009h-zoneinfo-noinstall.patch
@@ -0,0 +1,32 @@
+From e43745593e4627de8027587cb3b4a465c93fa0b1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 19 Dec 2012 19:22:29 +0100
+Subject: [PATCH] Do not install zoneinfo files.
+
+---
+ setup.py | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index c8152d5..8f13279 100644
+--- a/setup.py
++++ b/setup.py
+@@ -13,15 +13,8 @@ me = 'Stuart Bishop'
+ memail = 'stuart@stuartbishop.net'
+ packages = ['pytz']
+ resources = ['zone.tab', 'locales/pytz.pot']
+-for dirpath, dirnames, filenames in os.walk(os.path.join('pytz', 'zoneinfo')):
+- # remove the 'pytz' part of the path
+- basepath = dirpath.split(os.path.sep, 1)[1]
+- resources.extend([os.path.join(basepath, filename)
+- for filename in filenames])
+ package_data = {'pytz': resources}
+
+-assert len(resources) > 10, 'zoneinfo files not found!'
+-
+ setup (
+ name='pytz',
+ version=pytz.VERSION,
+--
+1.8.0.2
+
diff --git a/dev-python/pytz/files/pytz-2009j-zoneinfo.patch b/dev-python/pytz/files/pytz-2009j-zoneinfo.patch
new file mode 100644
index 000000000000..ee05d9f5efa4
--- /dev/null
+++ b/dev-python/pytz/files/pytz-2009j-zoneinfo.patch
@@ -0,0 +1,14 @@
+Use the system zoneinfo from sys-libs/timezone-data.
+
+--- pytz/__init__.py
++++ pytz/__init__.py
+@@ -54,8 +54,7 @@
+ 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)
++ filename = os.path.join('/usr/share/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
diff --git a/dev-python/pytz/files/pytz-2018.4-zoneinfo-noinstall.patch b/dev-python/pytz/files/pytz-2018.4-zoneinfo-noinstall.patch
new file mode 100644
index 000000000000..9f8b93bf70a5
--- /dev/null
+++ b/dev-python/pytz/files/pytz-2018.4-zoneinfo-noinstall.patch
@@ -0,0 +1,18 @@
+--- a/setup.py
++++ b/setup.py
+@@ -15,15 +15,8 @@
+ memail = 'stuart@stuartbishop.net'
+ packages = ['pytz']
+ resources = ['zone.tab', 'locales/pytz.pot']
+-for dirpath, dirnames, filenames in os.walk(os.path.join('pytz', 'zoneinfo')):
+- # remove the 'pytz' part of the path
+- basepath = dirpath.split(os.path.sep, 1)[1]
+- resources.extend([os.path.join(basepath, filename)
+- for filename in filenames])
+ package_data = {'pytz': resources}
+
+-assert len(resources) > 10, 'zoneinfo files not found!'
+-
+ setup(
+ name='pytz',
+ version=pytz.VERSION,
diff --git a/dev-python/pytz/metadata.xml b/dev-python/pytz/metadata.xml
new file mode 100644
index 000000000000..afe53148fe95
--- /dev/null
+++ b/dev-python/pytz/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+ pytz brings the Olson tz database into Python. This library allows
+ accurate and cross platform timezone calculations using Python 2.3
+ or higher. It also solves the issue of ambiguous times at the end of
+ daylight savings, which you can read more about in the Python
+ Library Reference (datetime.tzinfo).
+ Amost all (over 540) of the Olson timezones are supported.
+</longdescription>
+ <upstream>
+ <remote-id type="pypi">pytz</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pytz/pytz-2016.3.ebuild b/dev-python/pytz/pytz-2016.3.ebuild
new file mode 100644
index 000000000000..1e9d7760a55d
--- /dev/null
+++ b/dev-python/pytz/pytz-2016.3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="World timezone definitions for Python"
+HOMEPAGE="https://pythonhosted.org/pytz/ https://pypi.org/project/pytz/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ || ( >=sys-libs/timezone-data-2015g sys-libs/glibc[vanilla] )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ # Use timezone-data zoneinfo.
+ "${FILESDIR}"/${PN}-2009j-zoneinfo.patch
+ # ...and do not install a copy of it.
+ "${FILESDIR}"/${PN}-2009h-zoneinfo-noinstall.patch
+)
+
+python_test() {
+ "${PYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}"
+}
diff --git a/dev-python/pytz/pytz-2017.2.ebuild b/dev-python/pytz/pytz-2017.2.ebuild
new file mode 100644
index 000000000000..e55aab5e8335
--- /dev/null
+++ b/dev-python/pytz/pytz-2017.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="World timezone definitions for Python"
+HOMEPAGE="https://pythonhosted.org/pytz/ https://pypi.org/project/pytz/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE=""
+
+RDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ || ( >=sys-libs/timezone-data-2017a sys-libs/glibc[vanilla] )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+PATCHES=(
+ # Use timezone-data zoneinfo.
+ "${FILESDIR}"/2016.6.1-zoneinfo.patch
+ # ...and do not install a copy of it.
+ "${FILESDIR}"/${PN}-2009h-zoneinfo-noinstall.patch
+)
+
+python_test() {
+ "${PYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}"
+}
diff --git a/dev-python/pytz/pytz-2018.4.ebuild b/dev-python/pytz/pytz-2018.4.ebuild
new file mode 100644
index 000000000000..18ae3c855054
--- /dev/null
+++ b/dev-python/pytz/pytz-2018.4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="World timezone definitions for Python"
+HOMEPAGE="https://pythonhosted.org/pytz/ https://pypi.org/project/pytz/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE=""
+
+RDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ || ( >=sys-libs/timezone-data-2017a sys-libs/glibc[vanilla] )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+PATCHES=(
+ # Use timezone-data zoneinfo.
+ "${FILESDIR}"/2018.4-zoneinfo.patch
+ # ...and do not install a copy of it.
+ "${FILESDIR}"/${PN}-2018.4-zoneinfo-noinstall.patch
+)
+
+python_test() {
+ "${PYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}"
+}