* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-dateutil/, dev-python/python-dateutil/files/
@ 2019-11-22 0:20 Patrick McLean
0 siblings, 0 replies; 5+ messages in thread
From: Patrick McLean @ 2019-11-22 0:20 UTC (permalink / raw
To: gentoo-commits
commit: 7e4e025b8614a5c69be5eddce8984d7805c08c80
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Thu Nov 21 23:18:19 2019 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Nov 21 23:55:12 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e4e025b
dev-python/python-dateutil: Verbump to 2.8.1, add py38
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/python-dateutil/Manifest | 1 +
.../python-dateutil-2.8.1-no-pytest-cov.patch | 18 +++++++
.../python-dateutil/python-dateutil-2.8.1.ebuild | 59 ++++++++++++++++++++++
3 files changed, 78 insertions(+)
diff --git a/dev-python/python-dateutil/Manifest b/dev-python/python-dateutil/Manifest
index 46398b25f55..2d1b643357b 100644
--- a/dev-python/python-dateutil/Manifest
+++ b/dev-python/python-dateutil/Manifest
@@ -5,3 +5,4 @@ DIST python-dateutil-2.7.3.tar.gz 302871 BLAKE2B 8b6cff6f977d52b64665f33d10513a6
DIST python-dateutil-2.7.4.tar.gz 302229 BLAKE2B e2a43d8587f895a9a72ca5ab5c18a5c471497c8f8e89459450219e9f5ecb55223f36f219d77df8da4c04d55fb5feb3a17f9a5c2318c077dac4307da7c0bd9645 SHA512 3b02b397e3138dc755f34a2f7a50464f96a73b7be1f335ce7da3fa99e6d59f34a0643dfb1c933d4ef4fbaab88364fab6e760e4b1e7040b8cbbfebdd75e7e9a4f
DIST python-dateutil-2.7.5.tar.gz 316043 BLAKE2B 29511f7e484c369084d696f45a07e01e096e7b1114f982026f8df71d569eea30d657956d3e53725ad57564c1e445414c2ed543e3e6d2dd89902d7838cbb9e6fe SHA512 762752191d584a3995b55bbcfadc829261a263e0e6515a52db2fc32157bf0b3f96f787107c49bbd77cab9ce7e3f692ab3e8f392260fc18e6456b74eb190b44d3
DIST python-dateutil-2.8.0.tar.gz 327134 BLAKE2B 6525eee57aeaef3c588413210df7c1ad3627a380c6e44af78e9acc9abea523b29e8d9afec495f8d1e585d25d32ab82e6e28bf93dca148893d2e6a533e1f4ce47 SHA512 ec7da86203572582f883a4686acf8a732a2de4f396d809057eb51b2c60dbca5623a7fa90c2c0618c281a2282c60841739bd837731a51cc876f4ff369297f2f81
+DIST python-dateutil-2.8.1.tar.gz 331745 BLAKE2B 9785fe93976d9bbe21d6610133e37e558cdde4062a1a738ccbf2bf80aa062882ba59c60f2b9bfc44c53e0f8fc4b5ebdd5d12b6ba54a60706576360e453b2f160 SHA512 337000216e0f8ce32d6363768444144183ab9268f69082f20858f2b3322b1c449e53b2f2b5dcb3645be22294659ce7838f74ace2fd7a7c4f2adc6cf806a9fa2c
diff --git a/dev-python/python-dateutil/files/python-dateutil-2.8.1-no-pytest-cov.patch b/dev-python/python-dateutil/files/python-dateutil-2.8.1-no-pytest-cov.patch
new file mode 100644
index 00000000000..84adb944548
--- /dev/null
+++ b/dev-python/python-dateutil/files/python-dateutil-2.8.1-no-pytest-cov.patch
@@ -0,0 +1,18 @@
+diff --git a/dateutil/test/conftest.py b/dateutil/test/conftest.py
+index 78ed70a..4bb4c0a 100644
+--- a/dateutil/test/conftest.py
++++ b/dateutil/test/conftest.py
+@@ -14,10 +14,11 @@ def pytest_collection_modifyitems(items):
+
+ marker = marker_getter('xfail')
+
++ # requires pytest-cov
+ # Need to query the args because conditional xfail tests still have
+ # the xfail mark even if they are not expected to fail
+- if marker and (not marker.args or marker.args[0]):
+- item.add_marker(pytest.mark.no_cover)
++ #if marker and (not marker.args or marker.args[0]):
++ # item.add_marker(pytest.mark.no_cover)
+
+
+ def set_tzpath():
diff --git a/dev-python/python-dateutil/python-dateutil-2.8.1.ebuild b/dev-python/python-dateutil/python-dateutil-2.8.1.ebuild
new file mode 100644
index 00000000000..f2c9ffa8ab9
--- /dev/null
+++ b/dev-python/python-dateutil/python-dateutil-2.8.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{5,6,7,8}} pypy{,3} )
+
+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-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="test"
+
+RDEPEND="
+ >=dev-python/six-1.5[${PYTHON_USEDEP}]
+ sys-libs/timezone-data
+"
+BDEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ )
+"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/0001-zoneinfo-Get-timezone-data-from-system-tzdata-r1.patch"
+ "${FILESDIR}/python-dateutil-2.8.1-no-pytest-cov.patch"
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # avoid a setuptools_scm dependency
+ sed -i "s:use_scm_version=True:version='${PV}':" setup.py || die
+
+ # don't install zoneinfo tarball
+ sed -i '/package_data=/d' setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_prepare() {
+ if [[ ${EPYTHON} == python3.7 ]]; then
+ # these tests are flakey on 3.7
+ rm dateutil/test/property/test_{parser,isoparse}_prop.py || die
+ fi
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-dateutil/, dev-python/python-dateutil/files/
@ 2024-03-01 19:06 Michał Górny
0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2024-03-01 19:06 UTC (permalink / raw
To: gentoo-commits
commit: 5a05276947c1f2ef37179bf415e72c9b0b04f70a
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 1 18:57:55 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Mar 1 19:06:52 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a052769
dev-python/python-dateutil: Bump to 2.9.0
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/python-dateutil/Manifest | 1 +
.../python-dateutil-2.9.0-no-pytest-cov.patch | 18 +++++
.../python-dateutil-2.9.0-system-tzdata.patch | 91 ++++++++++++++++++++++
.../python-dateutil/python-dateutil-2.9.0.ebuild | 47 +++++++++++
4 files changed, 157 insertions(+)
diff --git a/dev-python/python-dateutil/Manifest b/dev-python/python-dateutil/Manifest
index e719bccf5703..d65916729160 100644
--- a/dev-python/python-dateutil/Manifest
+++ b/dev-python/python-dateutil/Manifest
@@ -1 +1,2 @@
DIST python-dateutil-2.8.2.tar.gz 357324 BLAKE2B 060f97280b63ed70e6d83fa5696af6dc3c729cdf5bc48c7a90e3e59eb0cc0360e5205536685550330d64ecc9b6e40ca12888409d6819dd136b17a67add2ec4e8 SHA512 6538858e4a3e2d1de1bf25b6d8b25e3a8d20bf60fb85e32d07ac491c90ce193e268bb5641371b8a79fb0f033a184bac9896b3bc643c1aca9ee9c6478286ac20c
+DIST python-dateutil-2.9.0.tar.gz 342990 BLAKE2B 32e4e4e251d27e5a870df24445fa0b2fa76761cb06ba4d8a779938a58fd5cf4bbf1739670f60ca4b41d46db6343a785d6bd71fbe3dd2a816d5cb0fa0d3296fbc SHA512 7dd550d646477c8c3953a42aabe4c0aa3f4d1f74f6fed018a1a429270f41aa2c6832df264e67510d380d149eaa436c1b613544c8026c180c2241f15205ca6d36
diff --git a/dev-python/python-dateutil/files/python-dateutil-2.9.0-no-pytest-cov.patch b/dev-python/python-dateutil/files/python-dateutil-2.9.0-no-pytest-cov.patch
new file mode 100644
index 000000000000..d483451a0adf
--- /dev/null
+++ b/dev-python/python-dateutil/files/python-dateutil-2.9.0-no-pytest-cov.patch
@@ -0,0 +1,18 @@
+diff --git a/tests/conftest.py b/tests/conftest.py
+index 78ed70a..4bb4c0a 100644
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -14,10 +14,11 @@ def pytest_collection_modifyitems(items):
+
+ marker = marker_getter('xfail')
+
++ # requires pytest-cov
+ # Need to query the args because conditional xfail tests still have
+ # the xfail mark even if they are not expected to fail
+- if marker and (not marker.args or marker.args[0]):
+- item.add_marker(pytest.mark.no_cover)
++ #if marker and (not marker.args or marker.args[0]):
++ # item.add_marker(pytest.mark.no_cover)
+
+
+ def set_tzpath():
diff --git a/dev-python/python-dateutil/files/python-dateutil-2.9.0-system-tzdata.patch b/dev-python/python-dateutil/files/python-dateutil-2.9.0-system-tzdata.patch
new file mode 100644
index 000000000000..08a983d9f6a2
--- /dev/null
+++ b/dev-python/python-dateutil/files/python-dateutil-2.9.0-system-tzdata.patch
@@ -0,0 +1,91 @@
+diff --git a/src/dateutil/zoneinfo/__init__.py b/src/dateutil/zoneinfo/__init__.py
+index 34f11ad..e3f0f94 100644
+--- a/src/dateutil/zoneinfo/__init__.py
++++ b/src/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(('.list', '.tab', '.zi', 'leapseconds')):
++ 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
+diff --git a/tests/test_imports.py b/tests/test_imports.py
+index 7d0749e..4256f45 100644
+--- a/tests/test_imports.py
++++ b/tests/test_imports.py
+@@ -232,9 +232,8 @@ def test_import_zone_info_from():
+ def test_import_zone_info_star():
+ 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:
+ assert var is not None
diff --git a/dev-python/python-dateutil/python-dateutil-2.9.0.ebuild b/dev-python/python-dateutil/python-dateutil-2.9.0.ebuild
new file mode 100644
index 000000000000..6d49a8fbb658
--- /dev/null
+++ b/dev-python/python-dateutil/python-dateutil-2.9.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYPI_NO_NORMALIZE=1
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Extensions to the standard Python datetime module"
+HOMEPAGE="
+ https://dateutil.readthedocs.io/
+ https://pypi.org/project/python-dateutil/
+ https://github.com/dateutil/dateutil/
+"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos"
+
+RDEPEND="
+ >=dev-python/six-1.5[${PYTHON_USEDEP}]
+ sys-libs/timezone-data
+"
+BDEPEND="
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
+ test? (
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/python-dateutil-2.9.0-system-tzdata.patch"
+ "${FILESDIR}/python-dateutil-2.9.0-no-pytest-cov.patch"
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # don't install zoneinfo tarball
+ sed -i '/package_data=/d' setup.py || die
+
+ distutils-r1_python_prepare_all
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-dateutil/, dev-python/python-dateutil/files/
@ 2021-08-16 6:13 Michał Górny
0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-08-16 6:13 UTC (permalink / raw
To: gentoo-commits
commit: d4346cb27b1976b6faa4eabb14d2478940d219f9
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 16 06:11:41 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Aug 16 06:11:41 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4346cb2
dev-python/python-dateutil: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/python-dateutil/Manifest | 1 -
...o-Get-timezone-data-from-system-tzdata-r1.patch | 104 ---------------------
.../python-dateutil-2.8.1-r3.ebuild | 54 -----------
3 files changed, 159 deletions(-)
diff --git a/dev-python/python-dateutil/Manifest b/dev-python/python-dateutil/Manifest
index 8781f6a62fc..e719bccf570 100644
--- a/dev-python/python-dateutil/Manifest
+++ b/dev-python/python-dateutil/Manifest
@@ -1,2 +1 @@
-DIST python-dateutil-2.8.1.tar.gz 331745 BLAKE2B 9785fe93976d9bbe21d6610133e37e558cdde4062a1a738ccbf2bf80aa062882ba59c60f2b9bfc44c53e0f8fc4b5ebdd5d12b6ba54a60706576360e453b2f160 SHA512 337000216e0f8ce32d6363768444144183ab9268f69082f20858f2b3322b1c449e53b2f2b5dcb3645be22294659ce7838f74ace2fd7a7c4f2adc6cf806a9fa2c
DIST python-dateutil-2.8.2.tar.gz 357324 BLAKE2B 060f97280b63ed70e6d83fa5696af6dc3c729cdf5bc48c7a90e3e59eb0cc0360e5205536685550330d64ecc9b6e40ca12888409d6819dd136b17a67add2ec4e8 SHA512 6538858e4a3e2d1de1bf25b6d8b25e3a8d20bf60fb85e32d07ac491c90ce193e268bb5641371b8a79fb0f033a184bac9896b3bc643c1aca9ee9c6478286ac20c
diff --git a/dev-python/python-dateutil/files/0001-zoneinfo-Get-timezone-data-from-system-tzdata-r1.patch b/dev-python/python-dateutil/files/0001-zoneinfo-Get-timezone-data-from-system-tzdata-r1.patch
deleted file mode 100644
index abbc853e090..00000000000
--- a/dev-python/python-dateutil/files/0001-zoneinfo-Get-timezone-data-from-system-tzdata-r1.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-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(('.list', '.tab', '.zi', 'leapseconds')):
-+ 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.8.1-r3.ebuild b/dev-python/python-dateutil/python-dateutil-2.8.1-r3.ebuild
deleted file mode 100644
index 214b011d5ba..00000000000
--- a/dev-python/python-dateutil/python-dateutil-2.8.1-r3.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..10} pypy3 )
-
-inherit distutils-r1
-
-DESCRIPTION="Extensions to the standard Python datetime module"
-HOMEPAGE="
- https://dateutil.readthedocs.io/
- 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 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
-
-RDEPEND="
- >=dev-python/six-1.5[${PYTHON_USEDEP}]
- sys-libs/timezone-data
-"
-BDEPEND="${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
- dev-python/setuptools_scm[${PYTHON_USEDEP}]
- test? (
- dev-python/freezegun[${PYTHON_USEDEP}]
- dev-python/hypothesis[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- "${FILESDIR}/0001-zoneinfo-Get-timezone-data-from-system-tzdata-r1.patch"
- "${FILESDIR}/python-dateutil-2.8.1-no-pytest-cov.patch"
-)
-
-distutils_enable_tests pytest
-
-python_prepare_all() {
- # don't install zoneinfo tarball
- sed -i '/package_data=/d' setup.py || die
-
- distutils-r1_python_prepare_all
-}
-
-python_prepare() {
- if [[ ${EPYTHON} == python3.7 ]]; then
- # these tests are flakey on 3.7
- rm dateutil/test/property/test_{parser,isoparse}_prop.py || die
- fi
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-dateutil/, dev-python/python-dateutil/files/
@ 2021-07-15 9:22 Michał Górny
0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2021-07-15 9:22 UTC (permalink / raw
To: gentoo-commits
commit: 00c5b3e761a5dee7eb73133667fc053c9365fc6f
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 15 04:27:51 2021 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Jul 15 09:22:20 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00c5b3e7
dev-python/python-dateutil: Bump to 2.8.2
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/python-dateutil/Manifest | 1 +
.../python-dateutil-2.8.2-system-tzdata.patch | 104 +++++++++++++++++++++
.../python-dateutil/python-dateutil-2.8.2.ebuild | 45 +++++++++
3 files changed, 150 insertions(+)
diff --git a/dev-python/python-dateutil/Manifest b/dev-python/python-dateutil/Manifest
index 9eb681136f6..8781f6a62fc 100644
--- a/dev-python/python-dateutil/Manifest
+++ b/dev-python/python-dateutil/Manifest
@@ -1 +1,2 @@
DIST python-dateutil-2.8.1.tar.gz 331745 BLAKE2B 9785fe93976d9bbe21d6610133e37e558cdde4062a1a738ccbf2bf80aa062882ba59c60f2b9bfc44c53e0f8fc4b5ebdd5d12b6ba54a60706576360e453b2f160 SHA512 337000216e0f8ce32d6363768444144183ab9268f69082f20858f2b3322b1c449e53b2f2b5dcb3645be22294659ce7838f74ace2fd7a7c4f2adc6cf806a9fa2c
+DIST python-dateutil-2.8.2.tar.gz 357324 BLAKE2B 060f97280b63ed70e6d83fa5696af6dc3c729cdf5bc48c7a90e3e59eb0cc0360e5205536685550330d64ecc9b6e40ca12888409d6819dd136b17a67add2ec4e8 SHA512 6538858e4a3e2d1de1bf25b6d8b25e3a8d20bf60fb85e32d07ac491c90ce193e268bb5641371b8a79fb0f033a184bac9896b3bc643c1aca9ee9c6478286ac20c
diff --git a/dev-python/python-dateutil/files/python-dateutil-2.8.2-system-tzdata.patch b/dev-python/python-dateutil/files/python-dateutil-2.8.2-system-tzdata.patch
new file mode 100644
index 00000000000..3790a29b421
--- /dev/null
+++ b/dev-python/python-dateutil/files/python-dateutil-2.8.2-system-tzdata.patch
@@ -0,0 +1,104 @@
+From 907459c6f632a87fce5729f6eebd2adf5b94e577 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 60b8600..b9f517c 100644
+--- a/dateutil/test/test_imports.py
++++ b/dateutil/test/test_imports.py
+@@ -168,9 +168,8 @@ def test_import_zone_info_from():
+ def test_import_zone_info_star():
+ 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:
+ assert var is not None
+diff --git a/dateutil/zoneinfo/__init__.py b/dateutil/zoneinfo/__init__.py
+index 34f11ad..e3f0f94 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(('.list', '.tab', '.zi', 'leapseconds')):
++ 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.32.0
+
diff --git a/dev-python/python-dateutil/python-dateutil-2.8.2.ebuild b/dev-python/python-dateutil/python-dateutil-2.8.2.ebuild
new file mode 100644
index 00000000000..3ef5ec777d0
--- /dev/null
+++ b/dev-python/python-dateutil/python-dateutil-2.8.2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+inherit distutils-r1
+
+DESCRIPTION="Extensions to the standard Python datetime module"
+HOMEPAGE="
+ https://dateutil.readthedocs.io/
+ 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 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+
+RDEPEND="
+ >=dev-python/six-1.5[${PYTHON_USEDEP}]
+ sys-libs/timezone-data
+"
+BDEPEND="
+ dev-python/setuptools_scm[${PYTHON_USEDEP}]
+ test? (
+ dev-python/freezegun[${PYTHON_USEDEP}]
+ dev-python/hypothesis[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/python-dateutil-2.8.2-system-tzdata.patch"
+ "${FILESDIR}/python-dateutil-2.8.1-no-pytest-cov.patch"
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # don't install zoneinfo tarball
+ sed -i '/package_data=/d' setup.py || die
+
+ distutils-r1_python_prepare_all
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/python-dateutil/, dev-python/python-dateutil/files/
@ 2018-04-20 11:53 Michał Górny
0 siblings, 0 replies; 5+ messages in thread
From: Michał Górny @ 2018-04-20 11:53 UTC (permalink / raw
To: gentoo-commits
commit: 19d591fa2356aab3456db0381747f7785ef8b7be
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 20 11:47:58 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Apr 20 11:51:32 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19d591fa
dev-python/python-dateutil: Use system tzdata correctly
Closes: https://bugs.gentoo.org/652226
...info-Get-timezone-data-from-system-tzdata.patch | 104 +++++++++++++++++++++
.../python-dateutil-2.7.2-r1.ebuild | 49 ++++++++++
2 files changed, 153 insertions(+)
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 00000000000..2e3f4ee914c
--- /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.7.2-r1.ebuild b/dev-python/python-dateutil/python-dateutil-2.7.2-r1.ebuild
new file mode 100644
index 00000000000..3ce895de047
--- /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}"
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-01 19:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-22 0:20 [gentoo-commits] repo/gentoo:master commit in: dev-python/python-dateutil/, dev-python/python-dateutil/files/ Patrick McLean
-- strict thread matches above, loose matches on Subject: below --
2024-03-01 19:06 Michał Górny
2021-08-16 6:13 Michał Górny
2021-07-15 9:22 Michał Górny
2018-04-20 11:53 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox