public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytz/files/, dev-python/pytz/
@ 2016-10-24 12:43 Lars Wendler
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Wendler @ 2016-10-24 12:43 UTC (permalink / raw
  To: gentoo-commits

commit:     f20f121b825cc6227b030e3441199cdef35137d2
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 11:56:24 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 11:56:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f20f121b

dev-python/pytz: Bump to version 2016.7

Package-Manager: portage-2.3.2
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 dev-python/pytz/Manifest                      |  1 +
 dev-python/pytz/files/2016.6.1-zoneinfo.patch |  4 +--
 dev-python/pytz/pytz-2016.7.ebuild            | 35 +++++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/dev-python/pytz/Manifest b/dev-python/pytz/Manifest
index 0232797..4a9adb4 100644
--- a/dev-python/pytz/Manifest
+++ b/dev-python/pytz/Manifest
@@ -3,3 +3,4 @@ DIST pytz-2015.6.tar.bz2 156925 SHA256 01eed1b2226dc386d8e467a2ff8c4f1aa08c65d5d
 DIST pytz-2015.7.tar.bz2 156812 SHA256 fbd26746772c24cb93c8b97cbdad5cb9e46c86bbdb1b9d8a743ee00e2fb1fc5d SHA512 ffdea72f36b286ea63a3dbc022626ab01d2348ebd29c3532e9e1a289c3112f0ff01e9f3fcf2ad389b609d14393b68c9652f61d1589551f4979a010185da0609c WHIRLPOOL 3ed0deee15f831ae735a9d4f317fe1eaca91e10f450343b0a1e24998846785fd5b02c71caa4ee4e40e426fdc780e2ac9ccaf54abc1f7a66c662bef84feacd691
 DIST pytz-2016.3.tar.bz2 170906 SHA256 c193dfa167ac32c8cb96f26cbcd92972591b22bda0bac3effdbdb04de6cc55d6 SHA512 8d91a84500257327361a8ccd19ce2d2e5848c10c7d4105ec1be012be592ec38113611558c7894c1825cc1967303901fce35079fc799cc10e84216864cd00266f WHIRLPOOL b2af20a788fa70c23b04cda3acdff812c30713f00a9aaf2144d85c64341f6fe4e365b558f3f0b5491c6c99ebf633d2d3910c95f7a6ae1f9c53b40da6bcbc23af
 DIST pytz-2016.6.1.tar.bz2 172223 SHA256 b5aff44126cf828537581e534cc94299b223b945a2bb3b5434d37bf8c7f3a10c SHA512 89a1e19861a15884aa0ddc68ad7221e362994a0457e2e178e80fee539bd52dd9dcdf94a5bb3aa33e60e7523b803860f8fe01f90236f2a8f0c2a8da0a62bb61b2 WHIRLPOOL b8f6de9065fce0b34a6aca21f3f2625d2e077f705ccd80baaec92e70e51960e0a88edb0611a18197612f4b359720cd34994d14cf2327cb9871e98f78035ff6d9
+DIST pytz-2016.7.tar.bz2 170973 SHA256 6eab31709e3a4aea748457707da45e805b650cbb352583805d2417de2a1dd71e SHA512 2c7d4691a0f49c732c8fe97f0df70b7ce4d7b8bb6c1d3db590dce78152cac46443cf5900d38d35472d92b2b8ef3654e0f67066279a7a1d357eac24d334501f3b WHIRLPOOL f286cd1cf735f1fe12aadafd4567ba037d81a88749fbf34d78052d20c80b5d6fca676fc43c35250bb935b3c3a5497d64ac1bc9af99d86bd2f911874d807bd2e7

diff --git a/dev-python/pytz/files/2016.6.1-zoneinfo.patch b/dev-python/pytz/files/2016.6.1-zoneinfo.patch
index 2d61448..d8223da 100644
--- a/dev-python/pytz/files/2016.6.1-zoneinfo.patch
+++ b/dev-python/pytz/files/2016.6.1-zoneinfo.patch
@@ -1,5 +1,5 @@
---- pytz/__init__.py.bak	2016-07-14 13:20:37.856381431 +0200
-+++ pytz/__init__.py	2016-07-14 13:21:00.464512973 +0200
+--- a/pytz/__init__.py
++++ b/pytz/__init__.py
 @@ -81,8 +81,7 @@
      for part in name_parts:
          if part == os.path.pardir or os.path.sep in part:

diff --git a/dev-python/pytz/pytz-2016.7.ebuild b/dev-python/pytz/pytz-2016.7.ebuild
new file mode 100644
index 00000000..a8f46e0
--- /dev/null
+++ b/dev-python/pytz/pytz-2016.7.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="World timezone definitions for Python"
+HOMEPAGE="http://pythonhosted.org/pytz/ https://pypi.python.org/pypi/pytz/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+DEPEND="
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	|| ( >=sys-libs/timezone-data-2015g sys-libs/glibc[vanilla] )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+	# Use timezone-data zoneinfo.
+	"${FILESDIR}"/2016.6.1-zoneinfo.patch
+	# ...and do not install a copy of it.
+	"${FILESDIR}"/${PN}-2009h-zoneinfo-noinstall.patch
+)
+
+python_test() {
+	"${PYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytz/files/, dev-python/pytz/
@ 2018-05-18 10:08 Aaron Swenson
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Swenson @ 2018-05-18 10:08 UTC (permalink / raw
  To: gentoo-commits

commit:     17d68571f1b02cd1bf6f3cfbaf1c466c04a1d68c
Author:     Aaron W. Swenson <titanofold <AT> gentoo <DOT> org>
AuthorDate: Fri May 18 10:07:58 2018 +0000
Commit:     Aaron Swenson <titanofold <AT> gentoo <DOT> org>
CommitDate: Fri May 18 10:07:58 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17d68571

dev-python/pytz: Bump to 2018.4

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 dev-python/pytz/Manifest                           |  1 +
 dev-python/pytz/files/2018.4-zoneinfo.patch        | 12 ++++++++
 .../files/pytz-2018.4-zoneinfo-noinstall.patch     | 18 +++++++++++
 dev-python/pytz/pytz-2018.4.ebuild                 | 35 ++++++++++++++++++++++
 4 files changed, 66 insertions(+)

diff --git a/dev-python/pytz/Manifest b/dev-python/pytz/Manifest
index 226e4e893f4..987f37053d5 100644
--- a/dev-python/pytz/Manifest
+++ b/dev-python/pytz/Manifest
@@ -1,2 +1,3 @@
 DIST pytz-2016.3.tar.bz2 170906 BLAKE2B ae1c5336919cd60d643afcaec8889793092da1b16c6cf6ccab7816bb7169b5bd8abd9180e4571682fbc077e11786dbea14dcb6457291f5285cd9898ea84efccb SHA512 8d91a84500257327361a8ccd19ce2d2e5848c10c7d4105ec1be012be592ec38113611558c7894c1825cc1967303901fce35079fc799cc10e84216864cd00266f
 DIST pytz-2017.2.zip 502168 BLAKE2B a1e02967700d0624d2c48bcedde52b772471aefcb1dc173fc067045a69d808dc8208ef300d67c683b0d49a0b19b6c22f9d5512a6a10559457e19a508e4b40ace SHA512 d67d64a64b4c21e0bd41da56020fc7b016aec9da7f3243f79b65704119f70b8a9cd4f5f905631b6761e06ecef93830e5e479e16c7b1611ac70e0cd2b39d5b916
+DIST pytz-2018.4.tar.gz 308066 BLAKE2B 665cebc5b535aafc92a1858b718d22818810534d8680a82ef3a0b66e6092f24226c36eb74feb690e25578b4d6ab8288cc4825eb5fb793345e11b0e71c6041868 SHA512 8a15e64d0d1a4b75c1e92360b22c06a41a692fe54fc8bfcff8cfa671095232d87f7929240441cd4d46826cd13f21d348125509c899be5a0b19bc7a77fdcb43c1

diff --git a/dev-python/pytz/files/2018.4-zoneinfo.patch b/dev-python/pytz/files/2018.4-zoneinfo.patch
new file mode 100644
index 00000000000..2eeeab416d7
--- /dev/null
+++ b/dev-python/pytz/files/2018.4-zoneinfo.patch
@@ -0,0 +1,12 @@
+--- a/pytz/__init__.py
++++ b/pytz/__init__.py
+@@ -91,8 +91,7 @@
+     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/dev-python/pytz/files/pytz-2018.4-zoneinfo-noinstall.patch b/dev-python/pytz/files/pytz-2018.4-zoneinfo-noinstall.patch
new file mode 100644
index 00000000000..9f8b93bf70a
--- /dev/null
+++ b/dev-python/pytz/files/pytz-2018.4-zoneinfo-noinstall.patch
@@ -0,0 +1,18 @@
+--- a/setup.py
++++ b/setup.py
+@@ -15,15 +15,8 @@
+ 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-2018.4.ebuild b/dev-python/pytz/pytz-2018.4.ebuild
new file mode 100644
index 00000000000..cbf731d3b20
--- /dev/null
+++ b/dev-python/pytz/pytz-2018.4.ebuild
@@ -0,0 +1,35 @@
+# 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 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1
+
+DESCRIPTION="World timezone definitions for Python"
+HOMEPAGE="http://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 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE=""
+
+RDEPEND="
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	|| ( >=sys-libs/timezone-data-2017a sys-libs/glibc[vanilla] )"
+DEPEND="${RDEPEND}
+	app-arch/unzip"
+
+PATCHES=(
+	# Use timezone-data zoneinfo.
+	"${FILESDIR}"/2018.4-zoneinfo.patch
+	# ...and do not install a copy of it.
+	"${FILESDIR}"/${PN}-2018.4-zoneinfo-noinstall.patch
+)
+
+python_test() {
+	"${PYTHON}" pytz/tests/test_tzinfo.py -v || die "Tests fail with ${EPYTHON}"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytz/files/, dev-python/pytz/
@ 2023-03-25 16:21 Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2023-03-25 16:21 UTC (permalink / raw
  To: gentoo-commits

commit:     17864cf886299bb86752cf231abdfc9bc5b0d552
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 25 16:20:09 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Mar 25 16:21:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17864cf8

dev-python/pytz: Use system timezone-data (again)

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../pytz/files/pytz-2023.2-system-tzinfo.patch     | 49 +++++++++++++++++++++
 dev-python/pytz/pytz-2023.2-r1.ebuild              | 51 ++++++++++++++++++++++
 2 files changed, 100 insertions(+)

diff --git a/dev-python/pytz/files/pytz-2023.2-system-tzinfo.patch b/dev-python/pytz/files/pytz-2023.2-system-tzinfo.patch
new file mode 100644
index 000000000000..4ce04416dc83
--- /dev/null
+++ b/dev-python/pytz/files/pytz-2023.2-system-tzinfo.patch
@@ -0,0 +1,49 @@
+Inspired by the Fedora patch:
+https://src.fedoraproject.org/rpms/pytz/blob/rawhide/f/pytz-zoneinfo.patch
+
+diff --git a/pytz/__init__.py b/pytz/__init__.py
+index f89d0eb..d00f3bb 100644
+--- a/pytz/__init__.py
++++ b/pytz/__init__.py
+@@ -75,6 +75,20 @@ else:  # Python 2.x
+         return s.encode('ASCII')
+ 
+ 
++def allzones():
++    for dirpath, dirnames, filenames in os.walk(_PYTZ_TZDATADIR):
++        for f in filenames:
++            p = os.path.join(dirpath, f)
++            if open(p, 'rb').read(4) == b'TZif':
++                yield os.path.relpath(p, _PYTZ_TZDATADIR)
++
++
++_PYTZ_TZDATADIR = os.environ.get('PYTZ_TZDATADIR', '/usr/share/zoneinfo')
++_all_timezones_unchecked = LazyList(x for x in allzones())
++all_timezones = _all_timezones_unchecked
++all_timezones_set = LazySet(all_timezones)
++
++
+ def open_resource(name):
+     """Open a resource from the zoneinfo subdir for reading.
+ 
+@@ -88,7 +102,7 @@ def open_resource(name):
+     for part in name_parts:
+         if part == os.path.pardir or os.sep in part:
+             raise ValueError('Bad path segment: %r' % part)
+-    zoneinfo_dir = os.environ.get('PYTZ_TZDATADIR', None)
++    zoneinfo_dir = _PYTZ_TZDATADIR
+     if zoneinfo_dir is not None:
+         filename = os.path.join(zoneinfo_dir, *name_parts)
+     else:
+diff --git a/setup.py b/setup.py
+index 24f7f37..b03592c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -21,7 +21,6 @@ for dirpath, dirnames, filenames in os.walk(os.path.join('pytz', 'zoneinfo')):
+     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',

diff --git a/dev-python/pytz/pytz-2023.2-r1.ebuild b/dev-python/pytz/pytz-2023.2-r1.ebuild
new file mode 100644
index 000000000000..eea96064ba6e
--- /dev/null
+++ b/dev-python/pytz/pytz-2023.2-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="World timezone definitions for Python"
+HOMEPAGE="
+	https://pythonhosted.org/pytz/
+	https://github.com/stub42/pytz/
+	https://pypi.org/project/pytz/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	|| (
+		>=sys-libs/timezone-data-2023b
+		sys-libs/glibc[vanilla]
+	)
+"
+BDEPEND="
+	test? (
+		${RDEPEND}
+	)
+"
+
+src_prepare() {
+	distutils-r1_src_prepare
+
+	# unbundle timezone-data
+	rm -r pytz/zoneinfo || die
+	# remove hardcoded list of all timezones but leave subjective set
+	# of "common timezones"
+	sed -i -e '/^_all_timezones_unchecked/,/^all_timezones_set/d' pytz/__init__.py || die
+	eapply "${FILESDIR}"/pytz-2023.2-system-tzinfo.patch
+}
+
+python_test() {
+	"${EPYTHON}" pytz/tests/test_tzinfo.py -v ||
+		die "Tests fail with ${EPYTHON}"
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-25 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-24 12:43 [gentoo-commits] repo/gentoo:master commit in: dev-python/pytz/files/, dev-python/pytz/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2018-05-18 10:08 Aaron Swenson
2023-03-25 16:21 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