From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4B7D91382C5 for ; Fri, 25 Dec 2020 09:17:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9162CE0AF9; Fri, 25 Dec 2020 09:17:18 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6B1D7E0AED for ; Fri, 25 Dec 2020 09:17:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 298CE341AAC for ; Fri, 25 Dec 2020 09:17:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A3CC046C for ; Fri, 25 Dec 2020 09:17:15 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1608885461.0c2448f5380c933df73fed46490ef130aec4f1e5.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytz/, dev-python/pytz/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pytz/Manifest dev-python/pytz/files/pytz-2020.5-system-zoneinfo.patch dev-python/pytz/pytz-2020.5.ebuild X-VCS-Directories: dev-python/pytz/ dev-python/pytz/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 0c2448f5380c933df73fed46490ef130aec4f1e5 X-VCS-Branch: master Date: Fri, 25 Dec 2020 09:17:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b5438412-e210-42ee-a7ac-7a054c9c8bf3 X-Archives-Hash: 90070a73df65896aca2a882c3c8151f8 commit: 0c2448f5380c933df73fed46490ef130aec4f1e5 Author: Michał Górny gentoo org> AuthorDate: Fri Dec 25 08:20:33 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Dec 25 08:37:41 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c2448f5 dev-python/pytz: Bump to 2020.5 Signed-off-by: Michał Górny gentoo.org> dev-python/pytz/Manifest | 1 + .../pytz/files/pytz-2020.5-system-zoneinfo.patch | 33 ++++++++++++++++++++++ dev-python/pytz/pytz-2020.5.ebuild | 32 +++++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/dev-python/pytz/Manifest b/dev-python/pytz/Manifest index 403e47ba5db..13d5040e6f8 100644 --- a/dev-python/pytz/Manifest +++ b/dev-python/pytz/Manifest @@ -1 +1,2 @@ DIST pytz-2020.4.tar.gz 310941 BLAKE2B 8abe524ccb7ed676c64dbc129ade5d6562980ea28f8939a3a7a406acf16a8a936e79ff630bf37884610e8936dfe96311ecb752f3b79519a126e1f1ac48883842 SHA512 dcbe763bc6e48c52df855fe03a8109dc0656a0e851324c0468f4307e8aff60e577fe0c9f0b062319e90d2f639b96e98edf8346064705e244143386c863a0aa7c +DIST pytz-2020.5.tar.gz 314194 BLAKE2B c374e0ee803878ad2dde1ef03c108f59f431d645d8067fb9f183b9feb029b4de283477e7f6c146a6d03462bd5cb4fc98118e03601c838f73903f5f7a7d28bf8f SHA512 0845c0b7cefb8732e3016568b17ae73232fe6537bac6da89cb1bf911ba5786ee1be6b5e3aa8767225291e3a7e9afd5b8e40e4051671a3a006f9e2f71c551e13e diff --git a/dev-python/pytz/files/pytz-2020.5-system-zoneinfo.patch b/dev-python/pytz/files/pytz-2020.5-system-zoneinfo.patch new file mode 100644 index 00000000000..94bad7e234a --- /dev/null +++ b/dev-python/pytz/files/pytz-2020.5-system-zoneinfo.patch @@ -0,0 +1,33 @@ +diff --git a/pytz/__init__.py b/pytz/__init__.py +index a1f75b6..f2a2330 100644 +--- a/pytz/__init__.py ++++ b/pytz/__init__.py +@@ -92,8 +92,7 @@ def open_resource(name): + if zoneinfo_dir is not None: + filename = os.path.join(zoneinfo_dir, *name_parts) + else: +- filename = os.path.join(os.path.dirname(__file__), +- 'zoneinfo', *name_parts) ++ filename = os.path.join('/usr/share/zoneinfo', *name_parts) + if not os.path.exists(filename): + # http://bugs.launchpad.net/bugs/383171 - we avoid using this + # unless absolutely necessary to help when a broken version of +diff --git a/setup.py b/setup.py +index e31ff2b..ba6926b 100644 +--- a/setup.py ++++ b/setup.py +@@ -15,14 +15,8 @@ me = 'Stuart Bishop' + memail = 'stuart@stuartbishop.net' + packages = ['pytz'] + resources = ['zone.tab', 'locales/pytz.pot'] +-for dirpath, dirnames, filenames in os.walk(os.path.join('pytz', 'zoneinfo')): +- # remove the 'pytz' part of the path +- basepath = dirpath.split(os.path.sep, 1)[1] +- resources.extend([os.path.join(basepath, filename) for filename in filenames]) + package_data = {'pytz': resources} + +-assert len(resources) > 10, 'zoneinfo files not found!' +- + setup( + name='pytz', + version=pytz.VERSION, diff --git a/dev-python/pytz/pytz-2020.5.ebuild b/dev-python/pytz/pytz-2020.5.ebuild new file mode 100644 index 00000000000..58a2cbcffbd --- /dev/null +++ b/dev-python/pytz/pytz-2020.5.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8,9} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="World timezone definitions for Python" +HOMEPAGE="https://pythonhosted.org/pytz/ https://pypi.org/project/pytz/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="MIT" +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 ~x86-macos ~x64-solaris" +IUSE="" + +RDEPEND=" + || ( >=sys-libs/timezone-data-2017a sys-libs/glibc[vanilla] )" +DEPEND="${RDEPEND} + app-arch/unzip" + +PATCHES=( + # Use timezone-data zoneinfo. + "${FILESDIR}"/pytz-2020.5-system-zoneinfo.patch +) + +python_test() { + "${EPYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}" +}