summaryrefslogtreecommitdiff
path: root/dev-python/python-dateutil
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-04-22 14:25:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-04-22 14:25:03 +0100
commit5e8702bcbbed438e6c6cce023e7ef0cc9baa3e02 (patch)
treeb041acef19bb9ae66c228d5c9d34d1e00aeb2b95 /dev-python/python-dateutil
parent5cfef3c94cd7e82136c69a0322f5ba21f7e64632 (diff)
gentoo resync : 22.04.2018
Diffstat (limited to 'dev-python/python-dateutil')
-rw-r--r--dev-python/python-dateutil/Manifest8
-rw-r--r--dev-python/python-dateutil/files/0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch104
-rw-r--r--dev-python/python-dateutil/python-dateutil-2.6.1.ebuild2
-rw-r--r--dev-python/python-dateutil/python-dateutil-2.7.1.ebuild2
-rw-r--r--dev-python/python-dateutil/python-dateutil-2.7.2-r1.ebuild49
-rw-r--r--dev-python/python-dateutil/python-dateutil-2.7.2.ebuild2
6 files changed, 161 insertions, 6 deletions
diff --git a/dev-python/python-dateutil/Manifest b/dev-python/python-dateutil/Manifest
index 16d73868b1e4..14ecc1dc5545 100644
--- a/dev-python/python-dateutil/Manifest
+++ b/dev-python/python-dateutil/Manifest
@@ -1,7 +1,9 @@
+AUX 0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch 3504 BLAKE2B b26810c285257c14eec697e7529c3a85c637619dc19979a48b16b0ce45780041e84946748b30b048de84f5b35bb320dd7f79a22a13f42954433ad7ec7f3286a4 SHA512 37ad4c6630b0055a57704b375e6fa869c87a16b0d5d6c79bf77dd5cdfd7aeac56ad696e5a8acc5028b34dec35b932fa76e9fa8b26095cd369508af3386d3f89c
DIST python-dateutil-2.6.1.tar.gz 241428 BLAKE2B 93b1d43dacdfbf528b085864b04231c1a34b37b23bc64a58a0733f53ace0f7e0258ca58fbc725dc2aae15eebe8ed1f555b02862a4dfd360014e7ee9aa8d6a9f9 SHA512 f16dd29fc975629f594dd2683a525e2a86acb020bf8962558d19040b14ac6f19d4ab07a910d6bb55c9db3cc02b5472774a3a05ccc86cf624ca5e5144463646db
DIST python-dateutil-2.7.1.tar.gz 298061 BLAKE2B a6bc2a3bf83ff234ddc53db5a3353b19303dd9e0c6d2d702537643e134508f96ccc69b962fd957d4cc754b07cd24b3c3c2ce07becc0add7db925b841d6a32b5d SHA512 3dbadeac3dd22bf51279c4237df96a925ed4063384a82e756a41e314c216751f2c90f8909a20ba96fdb065966034e9c7e40c1ea152876ca733a2176893c4deb2
DIST python-dateutil-2.7.2.tar.gz 298000 BLAKE2B 4091108b125eb080809c74cdb53daa27973b2dc4b2c4f79eba2afb295fce7b6c21a8589d4643ad5af212900f55dc4139711929d5c7c4a2b094ac749d76125761 SHA512 b8fdc867aa67c4e5602bb3e9bf906dd4d32a6616fcdfd5f39d146d849a46d13c266bc9c2eae28490399fe608ba19dcb824d05ce96d556de07999449eaece7dfc
-EBUILD python-dateutil-2.6.1.ebuild 949 BLAKE2B b0d7a198e984aa896a468c183f24a3519e8a75ddbd65f4caa2fc1727844c2afa84f9934a1808897c025870c52269706aca12f283334ae63479f224ef20f1d51d SHA512 814b96cb5cd4544dc92ae1c93b7d8edfb0f3357beafd5ccbd70e3180cdbe7f98146a2083717e86db14b6f596deeadf381cb38706daa4085e4e092a8c0abce506
-EBUILD python-dateutil-2.7.1.ebuild 1135 BLAKE2B 1c4ebd9cea2c6178072e1a1f1b04eddaed6445952e26da22d45b31f9cbc03dfa689d9993821efa208077552c7106d6dcd1bb351c168630aa5cbab802e727f995 SHA512 628d6079c0dab76ef8c045c5ae424f2bc3e525e4af4b679557abb30fc3371c03a66852158aad108e348c4e55733f649d67a6628eae8e0b7c03faae6e5f89af00
-EBUILD python-dateutil-2.7.2.ebuild 1135 BLAKE2B 1c4ebd9cea2c6178072e1a1f1b04eddaed6445952e26da22d45b31f9cbc03dfa689d9993821efa208077552c7106d6dcd1bb351c168630aa5cbab802e727f995 SHA512 628d6079c0dab76ef8c045c5ae424f2bc3e525e4af4b679557abb30fc3371c03a66852158aad108e348c4e55733f649d67a6628eae8e0b7c03faae6e5f89af00
+EBUILD python-dateutil-2.6.1.ebuild 945 BLAKE2B 8f378bb5365006651fb2f111ad1c2ad597494cd240806f700380ddc495fb8223a44ce7d798f5116ef83bd9c39c8743af9ddadd93ec97227bf2912387207635f0 SHA512 ca749fc89c58836f7ee3846ee6b29ef3cf6db33b2069e3bd4a789cf6a0771c4e31f5eb12774b4ee0ed6f84fcfde18b9e50157fd670f601eae131fa5b95260869
+EBUILD python-dateutil-2.7.1.ebuild 1131 BLAKE2B 643078f1ad294e4132aab4a1e15ba4bb952cbce45abe830cffce6a31a663d04977662a7e9531e8a554f8c089a19e32d70761e8173b89e417fb4c7446b8e77151 SHA512 0235b1a13078b8d56492146e4987cf1fb6c7173c9f06f1226b97d5d089324542a8e853d682b2b5f7a799002a8e2c40ff8b5342950b026963a3622b3d071a41d6
+EBUILD python-dateutil-2.7.2-r1.ebuild 1225 BLAKE2B e3b6f9bdc559eee10d1302cd72c93a0da4572bed28aa1b3d06070ebe42391d0e3f8d8db3f48e36c69e426cd31f8632cc430cce15c2dc52bd8f2bde491fd661b6 SHA512 1fe8740410d118b82a8820af806912368f368adb8d58b4583e044c555e20e90fb839cc9693bb68c166c47752cf3e56bbccd3191b93d06e89b1030ce23b875469
+EBUILD python-dateutil-2.7.2.ebuild 1131 BLAKE2B 643078f1ad294e4132aab4a1e15ba4bb952cbce45abe830cffce6a31a663d04977662a7e9531e8a554f8c089a19e32d70761e8173b89e417fb4c7446b8e77151 SHA512 0235b1a13078b8d56492146e4987cf1fb6c7173c9f06f1226b97d5d089324542a8e853d682b2b5f7a799002a8e2c40ff8b5342950b026963a3622b3d071a41d6
MISC metadata.xml 603 BLAKE2B 1bf49feeeec3ffc2f767228a84b3f9edf53cf44d8a1df3fa8f85798c0d3ea8f448d6113d425baa6b4b342b88746133d2770b951488d602dbb175f5ff9a99ea36 SHA512 87f5ea8b8918e72b57b91d32ed103d88f93ad9fbbe0a8f3f8b8ea72627d82e5cac25246553a0cb6988af26c30841ca5a3ddccf7f957603283a1b4e455a7c6439
diff --git a/dev-python/python-dateutil/files/0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch b/dev-python/python-dateutil/files/0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch
new file mode 100644
index 000000000000..2e3f4ee914ce
--- /dev/null
+++ b/dev-python/python-dateutil/files/0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch
@@ -0,0 +1,104 @@
+From f48e70ae846c161dfbfe6ddb36e4bcad4427ac8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 3 Apr 2018 22:03:32 +0200
+Subject: [PATCH] zoneinfo: Get timezone data from system tzdata
+
+---
+ dateutil/test/test_imports.py | 3 +--
+ dateutil/zoneinfo/__init__.py | 25 ++++++++++++++-----------
+ 2 files changed, 15 insertions(+), 13 deletions(-)
+
+diff --git a/dateutil/test/test_imports.py b/dateutil/test/test_imports.py
+index 2a19b62..97d07e4 100644
+--- a/dateutil/test/test_imports.py
++++ b/dateutil/test/test_imports.py
+@@ -158,9 +158,8 @@ class ImportZoneInfoTest(unittest.TestCase):
+ def testZoneinfoStar(self):
+ from dateutil.zoneinfo import gettz
+ from dateutil.zoneinfo import gettz_db_metadata
+- from dateutil.zoneinfo import rebuild
+
+- zi_all = (gettz, gettz_db_metadata, rebuild)
++ zi_all = (gettz, gettz_db_metadata)
+
+ for var in zi_all:
+ self.assertIsNot(var, None)
+diff --git a/dateutil/zoneinfo/__init__.py b/dateutil/zoneinfo/__init__.py
+index 34f11ad..e9870ca 100644
+--- a/dateutil/zoneinfo/__init__.py
++++ b/dateutil/zoneinfo/__init__.py
+@@ -1,6 +1,7 @@
+ # -*- coding: utf-8 -*-
+ import warnings
+ import json
++import os
+
+ from tarfile import TarFile
+ from pkgutil import get_data
+@@ -10,7 +11,7 @@ from dateutil.tz import tzfile as _tzfile
+
+ __all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata"]
+
+-ZONEFILENAME = "dateutil-zoneinfo.tar.gz"
++ZONEDIRECTORY = "/usr/share/zoneinfo"
+ METADATA_FN = 'METADATA'
+
+
+@@ -19,12 +20,14 @@ class tzfile(_tzfile):
+ return (gettz, (self._filename,))
+
+
+-def getzoneinfofile_stream():
+- try:
+- return BytesIO(get_data(__name__, ZONEFILENAME))
+- except IOError as e: # TODO switch to FileNotFoundError?
+- warnings.warn("I/O error({0}): {1}".format(e.errno, e.strerror))
+- return None
++def iter_zones(topdir):
++ for dirpath, dirnames, filenames in os.walk(topdir):
++ for f in filenames:
++ if f.endswith('.tab'):
++ continue
++ fpath = os.path.join(dirpath, f)
++ relpath = os.path.relpath(fpath, topdir)
++ yield (relpath, tzfile(fpath, filename=relpath))
+
+
+ class ZoneInfoFile(object):
+@@ -48,7 +51,7 @@ class ZoneInfoFile(object):
+ # no metadata in tar file
+ self.metadata = None
+ else:
+- self.zones = {}
++ self.zones = dict(iter_zones(ZONEDIRECTORY))
+ self.metadata = None
+
+ def get(self, name, default=None):
+@@ -99,7 +102,7 @@ def get_zonefile_instance(new_instance=False):
+ zif = getattr(get_zonefile_instance, '_cached_instance', None)
+
+ if zif is None:
+- zif = ZoneInfoFile(getzoneinfofile_stream())
++ zif = ZoneInfoFile()
+
+ get_zonefile_instance._cached_instance = zif
+
+@@ -140,7 +143,7 @@ def gettz(name):
+ DeprecationWarning)
+
+ if len(_CLASS_ZONE_INSTANCE) == 0:
+- _CLASS_ZONE_INSTANCE.append(ZoneInfoFile(getzoneinfofile_stream()))
++ _CLASS_ZONE_INSTANCE.append(ZoneInfoFile())
+ return _CLASS_ZONE_INSTANCE[0].zones.get(name)
+
+
+@@ -163,5 +166,5 @@ def gettz_db_metadata():
+ DeprecationWarning)
+
+ if len(_CLASS_ZONE_INSTANCE) == 0:
+- _CLASS_ZONE_INSTANCE.append(ZoneInfoFile(getzoneinfofile_stream()))
++ _CLASS_ZONE_INSTANCE.append(ZoneInfoFile())
+ return _CLASS_ZONE_INSTANCE[0].metadata
+--
+2.17.0
+
diff --git a/dev-python/python-dateutil/python-dateutil-2.6.1.ebuild b/dev-python/python-dateutil/python-dateutil-2.6.1.ebuild
index 9673ebb8cdd1..666cc8046378 100644
--- a/dev-python/python-dateutil/python-dateutil-2.6.1.ebuild
+++ b/dev-python/python-dateutil/python-dateutil-2.6.1.ebuild
@@ -10,7 +10,7 @@ inherit distutils-r1
DESCRIPTION="Extensions to the standard Python datetime module"
HOMEPAGE="
https://dateutil.readthedocs.org/
- https://pypi.python.org/pypi/python-dateutil
+ https://pypi.org/project/python-dateutil
https://github.com/dateutil/dateutil/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
diff --git a/dev-python/python-dateutil/python-dateutil-2.7.1.ebuild b/dev-python/python-dateutil/python-dateutil-2.7.1.ebuild
index 8ccb00532b22..859155cde63d 100644
--- a/dev-python/python-dateutil/python-dateutil-2.7.1.ebuild
+++ b/dev-python/python-dateutil/python-dateutil-2.7.1.ebuild
@@ -10,7 +10,7 @@ inherit distutils-r1
DESCRIPTION="Extensions to the standard Python datetime module"
HOMEPAGE="
https://dateutil.readthedocs.org/
- https://pypi.python.org/pypi/python-dateutil
+ https://pypi.org/project/python-dateutil
https://github.com/dateutil/dateutil/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
diff --git a/dev-python/python-dateutil/python-dateutil-2.7.2-r1.ebuild b/dev-python/python-dateutil/python-dateutil-2.7.2-r1.ebuild
new file mode 100644
index 000000000000..3ce895de047d
--- /dev/null
+++ b/dev-python/python-dateutil/python-dateutil-2.7.2-r1.ebuild
@@ -0,0 +1,49 @@
+# 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 )
+
+inherit distutils-r1
+
+DESCRIPTION="Extensions to the standard Python datetime module"
+HOMEPAGE="
+ https://dateutil.readthedocs.org/
+ https://pypi.org/project/python-dateutil
+ https://github.com/dateutil/dateutil/
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+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="test"
+
+RDEPEND="
+ >=dev-python/six-1.5[${PYTHON_USEDEP}]
+ sys-libs/timezone-data
+"
+DEPEND="${RDEPEND}
+ dev-python/setuptools_scm[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/pytest[${PYTHON_USEDEP}]
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ )
+"
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}"/0001-zoneinfo-Get-timezone-data-from-system-tzdata.patch
+ )
+
+ # don't install zoneinfo tarball
+ sed -i '/package_data=/d' setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ py.test -v || die "Tests failed under ${EPYTHON}"
+}
diff --git a/dev-python/python-dateutil/python-dateutil-2.7.2.ebuild b/dev-python/python-dateutil/python-dateutil-2.7.2.ebuild
index 8ccb00532b22..859155cde63d 100644
--- a/dev-python/python-dateutil/python-dateutil-2.7.2.ebuild
+++ b/dev-python/python-dateutil/python-dateutil-2.7.2.ebuild
@@ -10,7 +10,7 @@ inherit distutils-r1
DESCRIPTION="Extensions to the standard Python datetime module"
HOMEPAGE="
https://dateutil.readthedocs.org/
- https://pypi.python.org/pypi/python-dateutil
+ https://pypi.org/project/python-dateutil
https://github.com/dateutil/dateutil/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"