commit:     0c2448f5380c933df73fed46490ef130aec4f1e5
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 25 08:20:33 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> 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 <mgorny <AT> 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 = '[email protected]'
+ 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}"
+}

Reply via email to