1 |
commit: b6ad4d9d8c90496252531a56ff9b21898544b448 |
2 |
Author: Robert Siebeck <gentoo.2019 <AT> r123 <DOT> de> |
3 |
AuthorDate: Thu Feb 25 21:19:43 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 27 16:49:40 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6ad4d9d |
7 |
|
8 |
app-i18n/transifex-client: fix failing test on 32 bit systems |
9 |
|
10 |
Closes: https://bugs.gentoo.org/771660 |
11 |
Signed-off-by: Robert Siebeck <gentoo.2019 <AT> r123.de> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/19658 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
.../files/transifex-client-timestamp.patch | 14 ++++++++ |
16 |
.../transifex-client-0.14.2-r2.ebuild | 37 ++++++++++++++++++++++ |
17 |
2 files changed, 51 insertions(+) |
18 |
|
19 |
diff --git a/app-i18n/transifex-client/files/transifex-client-timestamp.patch b/app-i18n/transifex-client/files/transifex-client-timestamp.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..9d1b2c46c76 |
22 |
--- /dev/null |
23 |
+++ b/app-i18n/transifex-client/files/transifex-client-timestamp.patch |
24 |
@@ -0,0 +1,14 @@ |
25 |
+diff -Naur ../transifex-client-0.14.2.orig/tests/test_project.py ./tests/test_project.py |
26 |
+--- ../transifex-client-0.14.2.orig/tests/test_project.py 2020-06-19 14:48:52.000000000 +0200 |
27 |
++++ ./tests/test_project.py 2021-02-25 22:08:29.353477306 +0100 |
28 |
+@@ -717,8 +717,8 @@ |
29 |
+ ) |
30 |
+ self.assertEqual(res, True) |
31 |
+ |
32 |
+- # "Recent" timestamp (in the future - 2100) |
33 |
+- ts_mock.return_value = 4111417171 |
34 |
++ # "Recent" timestamp (in the future - 2038) |
35 |
++ ts_mock.return_value = 2147483000 |
36 |
+ res = self.p._should_download( |
37 |
+ 'pt', self.stats, os.path.abspath(__file__), False, |
38 |
+ use_git_timestamps=True |
39 |
|
40 |
diff --git a/app-i18n/transifex-client/transifex-client-0.14.2-r2.ebuild b/app-i18n/transifex-client/transifex-client-0.14.2-r2.ebuild |
41 |
new file mode 100644 |
42 |
index 00000000000..7efb2192722 |
43 |
--- /dev/null |
44 |
+++ b/app-i18n/transifex-client/transifex-client-0.14.2-r2.ebuild |
45 |
@@ -0,0 +1,37 @@ |
46 |
+# Copyright 1999-2021 Gentoo Authors |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+ |
49 |
+EAPI=7 |
50 |
+ |
51 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
52 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
53 |
+ |
54 |
+inherit eutils distutils-r1 |
55 |
+ |
56 |
+DESCRIPTION="A command line interface for Transifex" |
57 |
+HOMEPAGE="https://pypi.org/project/transifex-client/ https://www.transifex.net/ https://github.com/transifex/transifex-client" |
58 |
+SRC_URI="mirror://pypi/t/${PN}/${P}.tar.gz" |
59 |
+ |
60 |
+LICENSE="GPL-2" |
61 |
+SLOT="0" |
62 |
+KEYWORDS="~amd64 ~ppc64 ~x86" |
63 |
+IUSE="test" |
64 |
+RESTRICT="!test? ( test )" |
65 |
+ |
66 |
+BDEPEND="test? ( dev-python/mock[${PYTHON_USEDEP}] )" |
67 |
+RDEPEND="dev-python/GitPython[${PYTHON_USEDEP}] |
68 |
+ <dev-python/python-slugify-5.0.0[${PYTHON_USEDEP}] |
69 |
+ dev-python/requests[${PYTHON_USEDEP}] |
70 |
+ <dev-python/six-2.0.0[${PYTHON_USEDEP}] |
71 |
+ dev-python/urllib3[${PYTHON_USEDEP}]" |
72 |
+ |
73 |
+distutils_enable_tests setup.py |
74 |
+ |
75 |
+src_prepare() { |
76 |
+ eapply_user |
77 |
+ sed -i -e 's:test_fetch_timestamp_from_git_tree:_&:' \ |
78 |
+ tests/test_utils.py || die |
79 |
+ sed -i '/tests_require=\["mock>=3.0.5,<4.0"\]/d' setup.py || die |
80 |
+ # Bug 771660 |
81 |
+ eapply "${FILESDIR}"/${PN}-timestamp.patch |
82 |
+} |