1 |
commit: b031aa31015287af7828fbb85a66a566138c8afa |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 3 10:28:12 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 3 10:50:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b031aa31 |
7 |
|
8 |
dev-python/Babel: Bump to 2.9.0 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/Babel/Babel-2.9.0.ebuild | 37 ++++++++++++++++++++++++++ |
13 |
dev-python/Babel/Manifest | 1 + |
14 |
dev-python/Babel/files/Babel-2.9.0-pypy3.patch | 33 +++++++++++++++++++++++ |
15 |
3 files changed, 71 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/Babel/Babel-2.9.0.ebuild b/dev-python/Babel/Babel-2.9.0.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..b10743d637c |
20 |
--- /dev/null |
21 |
+++ b/dev-python/Babel/Babel-2.9.0.ebuild |
22 |
@@ -0,0 +1,37 @@ |
23 |
+# Copyright 1999-2020 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+PYTHON_COMPAT=( pypy3 python3_{6..9} ) |
29 |
+PYTHON_REQ_USE="threads(+)" |
30 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
31 |
+ |
32 |
+inherit distutils-r1 |
33 |
+ |
34 |
+DESCRIPTION="Collection of tools for internationalizing Python applications" |
35 |
+HOMEPAGE="https://babel.pocoo.org/ https://pypi.org/project/Babel/" |
36 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
37 |
+ |
38 |
+LICENSE="BSD" |
39 |
+SLOT="0" |
40 |
+KEYWORDS="~amd64 ~x86" |
41 |
+ |
42 |
+RDEPEND="dev-python/pytz[${PYTHON_USEDEP}] |
43 |
+ $(python_gen_cond_dep ' |
44 |
+ dev-python/backports-zoneinfo[${PYTHON_USEDEP}] |
45 |
+ ' python3_{6..8} pypy3)" |
46 |
+DEPEND="${DEPEND} |
47 |
+ test? ( dev-python/freezegun[${PYTHON_USEDEP}] )" |
48 |
+ |
49 |
+distutils_enable_sphinx docs |
50 |
+distutils_enable_tests pytest |
51 |
+ |
52 |
+PATCHES=( |
53 |
+ "${FILESDIR}"/Babel-2.9.0-pypy3.patch |
54 |
+) |
55 |
+ |
56 |
+src_test() { |
57 |
+ local -x TZ=UTC |
58 |
+ distutils-r1_src_test |
59 |
+} |
60 |
|
61 |
diff --git a/dev-python/Babel/Manifest b/dev-python/Babel/Manifest |
62 |
index 3239a74c302..53cefd9bb2b 100644 |
63 |
--- a/dev-python/Babel/Manifest |
64 |
+++ b/dev-python/Babel/Manifest |
65 |
@@ -1,2 +1,3 @@ |
66 |
DIST Babel-2.8.0.tar.gz 8444381 BLAKE2B ea3757182464770f47d3253e77bece7b64c84558e7a19fc55759198bfa55c6d8156d27e9de7b796b62eefd93e458c7e00b2014dd23e4ed7383f5bc9785d1a332 SHA512 f9687b36176c146a8ace073197111463d24fca343bb1dbee8b0e37a7f37b68b4cd77ffbe3bf14a20f8f64c701aa860e0b5e6076658a95dbee2556f0688d68d91 |
67 |
DIST Babel-2.8.1.tar.gz 8471453 BLAKE2B bc2e66a3c1c77e5b190cdb3f53d149268b6f49adde3040cbe6a3dd8eb98f6caffb3988232e76083e606186a87b9ee6b2b5352de89b7bc43d4f72905f1f594127 SHA512 ed39ad01b873d40d0bc611739761d412ff442b2df3d4c2363ec24501547da678cb752f640a02470c8513073a76c468c27fc16248820c779ef7adbe14d0f07199 |
68 |
+DIST Babel-2.9.0.tar.gz 8682986 BLAKE2B 0e1e8fe647fdd27230ee9c97f0994772bd5877f262f9cd00eb450445c5780b278249f87d50f98c5ca3fa5eca287c6b4fc74c5e082c522c250d640912f0ebc581 SHA512 250d1a19741eb0d1bda9d6b862f2d4779b6c67f10b8e045f450a271a16587e30f26f35ccccfea8ca13bb519582d2ef83569fa4381d0590fb9b61bf3ebf67e5f6 |
69 |
|
70 |
diff --git a/dev-python/Babel/files/Babel-2.9.0-pypy3.patch b/dev-python/Babel/files/Babel-2.9.0-pypy3.patch |
71 |
new file mode 100644 |
72 |
index 00000000000..45d50f5ff0b |
73 |
--- /dev/null |
74 |
+++ b/dev-python/Babel/files/Babel-2.9.0-pypy3.patch |
75 |
@@ -0,0 +1,33 @@ |
76 |
+From a291ee5da29fb9767ce8dc5f94e3fa19908f2596 Mon Sep 17 00:00:00 2001 |
77 |
+From: Keri Volans <keri.volans@×××××.com> |
78 |
+Date: Sun, 10 May 2020 18:43:58 +0100 |
79 |
+Subject: [PATCH] tests/test_dates.py: Fix broken test |
80 |
+ |
81 |
+datetime was being incorrectly patched, so the unittest was failing |
82 |
+ |
83 |
+Closes https://github.com/python-babel/babel/issues/675 |
84 |
+--- |
85 |
+ tests/test_dates.py | 3 +-- |
86 |
+ 1 file changed, 1 insertion(+), 2 deletions(-) |
87 |
+ |
88 |
+diff --git a/tests/test_dates.py b/tests/test_dates.py |
89 |
+index 5be0d16a..3cd70d3e 100644 |
90 |
+--- a/tests/test_dates.py |
91 |
++++ b/tests/test_dates.py |
92 |
+@@ -761,7 +761,6 @@ def test_zh_TW_format(): |
93 |
+ |
94 |
+ |
95 |
+ def test_format_current_moment(monkeypatch): |
96 |
+- import datetime as datetime_module |
97 |
+ frozen_instant = datetime.utcnow() |
98 |
+ |
99 |
+ class frozen_datetime(datetime): |
100 |
+@@ -771,7 +770,7 @@ def utcnow(cls): |
101 |
+ return frozen_instant |
102 |
+ |
103 |
+ # Freeze time! Well, some of it anyway. |
104 |
+- monkeypatch.setattr(datetime_module, "datetime", frozen_datetime) |
105 |
++ monkeypatch.setattr(dates, "datetime_", frozen_datetime) |
106 |
+ assert dates.format_datetime(locale="en_US") == dates.format_datetime(frozen_instant, locale="en_US") |
107 |
+ |
108 |
+ |