From 4df3bf9762850b34cd1ead5c80374d1a0fc3362e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 12 Jul 2021 08:41:54 +0100 Subject: gentoo resync : 12.07.2021 --- dev-python/pytzdata/Manifest | 3 +- .../files/pytzdata-2020.1-system-zoneinfo.patch | 115 +++++++++++++++++++++ dev-python/pytzdata/pytzdata-2020.1-r1.ebuild | 24 +++++ dev-python/pytzdata/pytzdata-2020.1.ebuild | 21 ---- 4 files changed, 141 insertions(+), 22 deletions(-) create mode 100644 dev-python/pytzdata/files/pytzdata-2020.1-system-zoneinfo.patch create mode 100644 dev-python/pytzdata/pytzdata-2020.1-r1.ebuild delete mode 100644 dev-python/pytzdata/pytzdata-2020.1.ebuild (limited to 'dev-python/pytzdata') diff --git a/dev-python/pytzdata/Manifest b/dev-python/pytzdata/Manifest index 136caa530ea7..ac7060051151 100644 --- a/dev-python/pytzdata/Manifest +++ b/dev-python/pytzdata/Manifest @@ -1,3 +1,4 @@ +AUX pytzdata-2020.1-system-zoneinfo.patch 3482 BLAKE2B 26c62593303e02d4037aba6e7b4ec7645610f3e73eadef9fcf483db5567e31d407efe92859d4157e672ce9683d135c2fcf2e63d427898d8bab1b0ead8db09299 SHA512 707afdd4bff5fb70f3bc4e20c88a1962f3fd56c15b3ff3e5896446d1eff55aaceefd53509fef1b4941d797e2c2aea41b72a87276fa64e562ad71609fa717a78e DIST pytzdata-2020.1.tar.gz 249045 BLAKE2B 6f07a7577edc87030fd70e720b32146e9044a8c6f74d0bafb9239ad666d0d6fd0ac7c3cca070914701af301b1a3368ace2985f8169b9747937fa6ed066be7302 SHA512 fd154bfbe90ce07a90f769063b772234036d2627c1e6d78a465d9ddbc894e50cb9d821c04ebff1a7cc6a327266f7843fe54e5592d37c41db023329d6e0f668c2 -EBUILD pytzdata-2020.1.ebuild 531 BLAKE2B 27fac0a70095a17f00490beb440b1e339761622d9f5fc59b43adbaaacbcacae709c5b0e69a221094301113e6feacb08bdd1536eecaef6dbbe6f0d7c2b5b138ff SHA512 f1e6be03868e09aed85e29608c9faf8c59acda229625930fab862aea18c34da379ecb52aaa7d43eb878ebf84ed7a77aab7ded56a21b86c0efdb5891836015019 +EBUILD pytzdata-2020.1-r1.ebuild 577 BLAKE2B c8c5680ed9d806dcd3e618224d13b3e4b596ae42b59eb13edf48c784f0c87ca2d89bdb9091cb6b4d43b8e2c3dd73ac02574eb89456c779ab4696f2d00dbaa96a SHA512 ffaddaeda54b0056898c34da6d35896c3891496dd9181dec1493d7a4e5c8553b28caad9b4aa3502a9dc8cb417d15704c317b42ee23e93251c66b00e83d0f25b3 MISC metadata.xml 570 BLAKE2B 70dff9edfcef656e24855124e37b1dc70c6c6c1dadd311de440f8a02a49217aa402bd042235020a000d6abdb33586d899fbad2dde1e222f74ce6e3c40837e2ef SHA512 c95854a376b49daf8e0f026edea0fed36da851c388b02d23ac685883bdd1aba670cfc548ba9f14928f0a3797223d3d5d6bad1d21ab88b4f1536cb93bcc60f6f0 diff --git a/dev-python/pytzdata/files/pytzdata-2020.1-system-zoneinfo.patch b/dev-python/pytzdata/files/pytzdata-2020.1-system-zoneinfo.patch new file mode 100644 index 000000000000..7a4cced9e720 --- /dev/null +++ b/dev-python/pytzdata/files/pytzdata-2020.1-system-zoneinfo.patch @@ -0,0 +1,115 @@ +From f0d2c5fd28dbe2aa9ecb59e140ab42b11d677a33 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Fri, 9 Jul 2021 10:15:51 +0200 +Subject: [PATCH] Use system zoneinfo database by default +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Michał Górny +--- + pytzdata/__init__.py | 2 +- + tests/test_set_directory.py | 8 +++----- + tests/test_tz_file.py | 5 ++--- + tests/test_tz_path.py | 5 ++--- + 4 files changed, 8 insertions(+), 12 deletions(-) + +diff --git a/pytzdata/__init__.py b/pytzdata/__init__.py +index 22940da..6c3bcb9 100644 +--- a/pytzdata/__init__.py ++++ b/pytzdata/__init__.py +@@ -8,7 +8,7 @@ from ._compat import FileNotFoundError + + + DEFAULT_DIRECTORY = os.path.join( +- os.path.dirname(__file__), ++ '/usr/share', + 'zoneinfo' + ) + +diff --git a/tests/test_set_directory.py b/tests/test_set_directory.py +index 430d239..6c078e6 100644 +--- a/tests/test_set_directory.py ++++ b/tests/test_set_directory.py +@@ -2,7 +2,7 @@ + + import os + import pytest +-from pytzdata import set_directory, tz_path, TimezoneNotFound ++from pytzdata import set_directory, tz_path, TimezoneNotFound, DEFAULT_DIRECTORY + + + fixtures_path = os.path.join(os.path.dirname(__file__), 'fixtures', 'tz') +@@ -30,9 +30,8 @@ def test_set_directory(): + with pytest.raises(TimezoneNotFound): + tz_path('America/New_York') + +- here = os.path.realpath(os.path.dirname(__file__)) + filepath = os.path.realpath( +- os.path.join(here, '..', 'pytzdata', 'zoneinfo', 'America', 'New_York') ++ os.path.join(DEFAULT_DIRECTORY, 'America', 'New_York') + ) + + set_directory() +@@ -51,9 +50,8 @@ def test_env_variable(): + + del os.environ['PYTZDATA_TZDATADIR'] + +- here = os.path.realpath(os.path.dirname(__file__)) + filepath = os.path.realpath( +- os.path.join(here, '..', 'pytzdata', 'zoneinfo', 'America', 'New_York') ++ os.path.join(DEFAULT_DIRECTORY, 'America', 'New_York') + ) + + set_directory() +diff --git a/tests/test_tz_file.py b/tests/test_tz_file.py +index 8b912b5..b20c08b 100644 +--- a/tests/test_tz_file.py ++++ b/tests/test_tz_file.py +@@ -3,7 +3,7 @@ + import os + import pytest + +-from pytzdata import tz_file, set_directory ++from pytzdata import tz_file, set_directory, DEFAULT_DIRECTORY + from pytzdata.exceptions import TimezoneNotFound + + +@@ -22,9 +22,8 @@ def teardown_module(module): + + + def test_tz_file(): +- here = os.path.realpath(os.path.dirname(__file__)) + filepath = os.path.realpath( +- os.path.join(here, '..', 'pytzdata', 'zoneinfo', 'Europe', 'Paris') ++ os.path.join(DEFAULT_DIRECTORY, 'Europe', 'Paris') + ) + + with open(filepath) as f1: +diff --git a/tests/test_tz_path.py b/tests/test_tz_path.py +index fd4db48..77c8c74 100644 +--- a/tests/test_tz_path.py ++++ b/tests/test_tz_path.py +@@ -3,7 +3,7 @@ + import os + import pytest + +-from pytzdata import tz_path, set_directory ++from pytzdata import tz_path, set_directory, DEFAULT_DIRECTORY + from pytzdata.exceptions import TimezoneNotFound + + +@@ -22,9 +22,8 @@ def teardown_module(module): + + + def test_tz_path(): +- here = os.path.realpath(os.path.dirname(__file__)) + filepath = os.path.realpath( +- os.path.join(here, '..', 'pytzdata', 'zoneinfo', 'Europe', 'Paris') ++ os.path.join(DEFAULT_DIRECTORY, 'Europe', 'Paris') + ) + + assert filepath == tz_path('Europe/Paris') +-- +2.32.0 + diff --git a/dev-python/pytzdata/pytzdata-2020.1-r1.ebuild b/dev-python/pytzdata/pytzdata-2020.1-r1.ebuild new file mode 100644 index 000000000000..d6192adb5e3a --- /dev/null +++ b/dev-python/pytzdata/pytzdata-2020.1-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_SETUPTOOLS=pyproject.toml +PYTHON_COMPAT=( python3_{8..10} ) +inherit distutils-r1 + +DESCRIPTION="The Olson timezone database for Python" +HOMEPAGE="https://github.com/sdispater/pytzdata" +SRC_URI="https://github.com/sdispater/pytzdata/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 x86" + +RDEPEND="dev-python/cleo[${PYTHON_USEDEP}]" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/pytzdata-2020.1-system-zoneinfo.patch +) diff --git a/dev-python/pytzdata/pytzdata-2020.1.ebuild b/dev-python/pytzdata/pytzdata-2020.1.ebuild deleted file mode 100644 index 1863e0277677..000000000000 --- a/dev-python/pytzdata/pytzdata-2020.1.ebuild +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DISTUTILS_USE_SETUPTOOLS=pyproject.toml -PYTHON_COMPAT=( python3_{7..10} ) -inherit distutils-r1 - -DESCRIPTION="The Olson timezone database for Python" -HOMEPAGE="https://github.com/sdispater/pytzdata" -SRC_URI="https://github.com/sdispater/pytzdata/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 x86" - -RDEPEND="dev-python/cleo[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND}" - -distutils_enable_tests pytest -- cgit v1.2.3