summaryrefslogtreecommitdiff
path: root/dev-python/python-dateutil
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-01 23:41:30 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-01 23:41:30 +0000
commit1331637681273dc8391d7a7caa6175405dceb735 (patch)
tree57acd1953dffe9d8e88a0735a76115e20fa09d26 /dev-python/python-dateutil
parent5d5b0e27ed33330cca5636eb792368fbbf46774c (diff)
gentoo auto-resync : 01:03:2024 - 23:41:29
Diffstat (limited to 'dev-python/python-dateutil')
-rw-r--r--dev-python/python-dateutil/Manifest4
-rw-r--r--dev-python/python-dateutil/files/python-dateutil-2.9.0-no-pytest-cov.patch18
-rw-r--r--dev-python/python-dateutil/files/python-dateutil-2.9.0-system-tzdata.patch91
-rw-r--r--dev-python/python-dateutil/python-dateutil-2.9.0.ebuild47
4 files changed, 160 insertions, 0 deletions
diff --git a/dev-python/python-dateutil/Manifest b/dev-python/python-dateutil/Manifest
index 2c46b2281a36..bc474a2c8368 100644
--- a/dev-python/python-dateutil/Manifest
+++ b/dev-python/python-dateutil/Manifest
@@ -1,5 +1,9 @@
AUX python-dateutil-2.8.1-no-pytest-cov.patch 687 BLAKE2B 97eb6d653a013b6fb279209804d7a82b4599ed672eb7a6b94654dc789ae3ad5e2978c9684439d94e405423c0a022ff70155c7d50f5d03a5e74cfe111a665ff7c SHA512 f4e90ed1d1cdab509a574319ae6cf0b646c2741eb05459c408caa29e1a6ca512e71a258ca8119c8e1f59948276c9e14e726b6f53cea868709bd89dea2280b700
AUX python-dateutil-2.8.2-system-tzdata.patch 3495 BLAKE2B b3d5ca203731932044f16bcde48f8f981f6907ce8a9319423d41eb0baf62331d472c1a5dd72ec3ac1f059296423adaea18bd4ea6d660add56cfd73ea86f26bf2 SHA512 44d2f3f9f0c04401cb545dc0a757b682eb3a9a66e63cf64121e75243cebdfa53945c6ae9bf197cb6b754c9732e9407fc9384aa45b2d7181740bb1ae23af718fe
+AUX python-dateutil-2.9.0-no-pytest-cov.patch 655 BLAKE2B cacb3840f5ad17062b65d7ce532dac96acd5f3ced199eddbcaae421cfa280d6628184cbe618aa54f24d841501c021828a0f8a1e761cb960eb73836cff596ef0e SHA512 6f1bf01585918463af85ade0f78e9648e27b9a2c7b8e735ee2cfc84625f895eb803b20b2ff66c733d5c866b3671939d52bb8f7396e02204ed278f62b9abfe1d9
+AUX python-dateutil-2.9.0-system-tzdata.patch 3072 BLAKE2B 53bdba62ec738f3987fea98caf020ab98c07de3a6dd3ce4195590a556526a6646b493fa55dce8aab9d5c63eb100604360274c188688c5a64991bb863ed4cfd8b SHA512 2a242d5aaccfb86efcf481b03ef17b00122e453984587ded8630da62b0dac422ebb09cf346f15c9a51a290d2df6b14b0a0482f90319d3fb29ac01d369cde7d6f
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
EBUILD python-dateutil-2.8.2-r1.ebuild 1131 BLAKE2B 92f694c73d52b86e5ff2004949b6a7793a3a32700130eaf90962b20d4277333f751aa14cc5c9804fca95fa4b68401df4444ce72f59fdda5127afe9d268c8c492 SHA512 eecb7473247860723fa774e041ea3958037b5818c866550e0de253083e92eff71c8573609aa108ee710112b078ab0490a234d245cc4cf00f10112be819e9c949
+EBUILD python-dateutil-2.9.0.ebuild 1139 BLAKE2B 07a18ac51de792625ef2dd26b734024fcd9c0822a668b5c82f7b1d8972f22f3a5c1c9569846d012271c80630297f6f5809d569c51ef9a2ddef07a08ac580f8c9 SHA512 c88c3f8316093a7cc0332e1eeece3881de7be179224ca07123faf5f540357ce95326d557486eade65b406e3c7245d6a5cc015ae9631d38da5971686b73d870f7
MISC metadata.xml 629 BLAKE2B 214855770bf1b160328f6a862bc1e3fd2d0e27a36c8ad240d494e8d8a54e5be4bac6abb7c2b94b1d8cccd7cc1026a100c8cc092203de3fd4c4173139d4722385 SHA512 ae326caea99b731c8ba2a162b2ea7e9441381777c9be8dd021caf12e04d2ec068215f61bbe2dd1baa6d4710defcd2dbc4ec5ee8b15f1c1817aaba1f8c841eda5
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
+}