diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/python-dateutil | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/python-dateutil')
7 files changed, 307 insertions, 0 deletions
diff --git a/dev-python/python-dateutil/Manifest b/dev-python/python-dateutil/Manifest new file mode 100644 index 000000000000..110a133d38f3 --- /dev/null +++ b/dev-python/python-dateutil/Manifest @@ -0,0 +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 945 BLAKE2B e76a7b5013c9c5bd1d4839b8b96a74e26bdba1845b33264959f892af6ba4ff7613721ae8329c350656a706406a33a0d95af2cba6044f8123c40c4e937c3fbbe2 SHA512 47a4de4eeeace543f6ff2763a6adf29e1eaa3b1e8724dc462b8ef9290c20dca5276be4a6a639ec75e1932ee87b489e4bee3be8efe36c2ada86abaf33c4094b2e +EBUILD python-dateutil-2.7.1.ebuild 1132 BLAKE2B 923c7bd5fbbd51013ebbc630f56429272ebcb768f68cc51d70d734dc477a4f0e614b4da6a411702384c78720b7e661a8d69e7fe12b00b4057bcbac3374c1b636 SHA512 d64f414372593288610a36fb6300b4153d9f306d1d414ce166887ecd011f9e8b9442738e5d43c7d4e5d3f485910663879ac3757d8f378a4f0a7846c017c76d46 +EBUILD python-dateutil-2.7.2-r1.ebuild 1219 BLAKE2B f385a16ba791d1b415c58ffd51feb9485dbe3fe7e9249ed76f2683b918e0a4b56fd51d461cb3ef55f4bc76f522e2d63ca5acd0d5735c18e2737ef045ae615e36 SHA512 ecac221f4b8e889c766c0f9f999d336b3f5b07f530d0e223690a1104973a3a3bcc04338ec32a8e1451444b587319c4e3cb57e599702eb22662649a92d6dcd634 +EBUILD python-dateutil-2.7.2.ebuild 1132 BLAKE2B 923c7bd5fbbd51013ebbc630f56429272ebcb768f68cc51d70d734dc477a4f0e614b4da6a411702384c78720b7e661a8d69e7fe12b00b4057bcbac3374c1b636 SHA512 d64f414372593288610a36fb6300b4153d9f306d1d414ce166887ecd011f9e8b9442738e5d43c7d4e5d3f485910663879ac3757d8f378a4f0a7846c017c76d46 +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/metadata.xml b/dev-python/python-dateutil/metadata.xml new file mode 100644 index 000000000000..4bee24c257f5 --- /dev/null +++ b/dev-python/python-dateutil/metadata.xml @@ -0,0 +1,17 @@ +<?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"> + The dateutil module provides powerful extensions to the standard + datetime module, available in Python 2.3+. + </longdescription> + <upstream> + <remote-id type="pypi">python-dateutil</remote-id> + <remote-id type="github">dateutil/dateutil</remote-id> + <remote-id type="launchpad">dateutil</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/python-dateutil/python-dateutil-2.6.1.ebuild b/dev-python/python-dateutil/python-dateutil-2.6.1.ebuild new file mode 100644 index 000000000000..c50f4f28b4ce --- /dev/null +++ b/dev-python/python-dateutil/python-dateutil-2.6.1.ebuild @@ -0,0 +1,38 @@ +# 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="" + +RDEPEND=" + >=dev-python/six-1.5[${PYTHON_USEDEP}] + sys-libs/timezone-data" +DEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}]" + +python_prepare_all() { + # don't install zoneinfo tarball + sed -i '/package_data=/d' setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + esetup.py test +} diff --git a/dev-python/python-dateutil/python-dateutil-2.7.1.ebuild b/dev-python/python-dateutil/python-dateutil-2.7.1.ebuild new file mode 100644 index 000000000000..07cf2a13590a --- /dev/null +++ b/dev-python/python-dateutil/python-dateutil-2.7.1.ebuild @@ -0,0 +1,45 @@ +# 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() { + # 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-r1.ebuild b/dev-python/python-dateutil/python-dateutil-2.7.2-r1.ebuild new file mode 100644 index 000000000000..e7fa0e0fe5d5 --- /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 new file mode 100644 index 000000000000..07cf2a13590a --- /dev/null +++ b/dev-python/python-dateutil/python-dateutil-2.7.2.ebuild @@ -0,0 +1,45 @@ +# 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() { + # 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}" +} |