1 |
commit: 50f1d559b947fb1165b9049f8f2cee68c8ee5a84 |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 29 22:10:14 2020 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 29 22:40:33 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50f1d559 |
7 |
|
8 |
dev-python/python-memcached: support PyPy3+Py3.{8,9} and fix tests |
9 |
|
10 |
Switch to the GitHub tarball that contains tests. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/718418 |
13 |
Package-Manager: Portage-3.0.8, Repoman-3.0.1 |
14 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
15 |
|
16 |
dev-python/python-memcached/Manifest | 1 + |
17 |
.../python-memcached-1.59-r1.ebuild | 44 ++++++++++++++++++++++ |
18 |
2 files changed, 45 insertions(+) |
19 |
|
20 |
diff --git a/dev-python/python-memcached/Manifest b/dev-python/python-memcached/Manifest |
21 |
index 9a85bb36945..00b745958fa 100644 |
22 |
--- a/dev-python/python-memcached/Manifest |
23 |
+++ b/dev-python/python-memcached/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
+DIST python-memcached-1.59-gh.tar.gz 32334 BLAKE2B de8d18ba887b03e4737b554cc4b0074a4f16745e26a8b3631a747c45019e1da83612677dc3e98f97d76e851320c61baafbd0a29231a826c14b7d3bf3e477f29e SHA512 d7ff45a329f2a9bf97fdc7c0268c2c67046c3501270fcf03578b955c2da35904d7bdecd4239924d390797ddff8f4cc69fc5743f4d4f663cdb9f2f8c7e8159512 |
26 |
DIST python-memcached-1.59.tar.gz 22210 BLAKE2B 50387821d50cf974ada738346e016eb736043078721bf905782f41df1f27574244d03b6b94ac9e5ccab7aeecfa8ca4c5a78cec2c41d15fda8756c7cb3bce9aa1 SHA512 a25cbb9efb3babe85e1523bdabfe4644b93b3a6a7268787a3928f724f833ce0eea7d2ef676d1b7f894cdfe293129975b35cb46ec553c92810dbc18013bfabece |
27 |
|
28 |
diff --git a/dev-python/python-memcached/python-memcached-1.59-r1.ebuild b/dev-python/python-memcached/python-memcached-1.59-r1.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..3b81d2ee352 |
31 |
--- /dev/null |
32 |
+++ b/dev-python/python-memcached/python-memcached-1.59-r1.ebuild |
33 |
@@ -0,0 +1,44 @@ |
34 |
+# Copyright 1999-2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+PYTHON_COMPAT=( pypy3 python3_{6..9} ) |
40 |
+ |
41 |
+inherit distutils-r1 |
42 |
+ |
43 |
+DESCRIPTION="Pure python memcached client" |
44 |
+HOMEPAGE=" |
45 |
+ https://www.tummy.com/Community/software/python-memcached/ |
46 |
+ https://pypi.org/project/python-memcached/ |
47 |
+" |
48 |
+# PyPI tarballs don't contain tests |
49 |
+SRC_URI="https://github.com/linsomniac/python-memcached/archive/${PV}.tar.gz -> ${P}-gh.tar.gz" |
50 |
+ |
51 |
+LICENSE="OSL-2.0" |
52 |
+SLOT="0" |
53 |
+KEYWORDS="~amd64 ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-macos" |
54 |
+ |
55 |
+RDEPEND="dev-python/six[${PYTHON_USEDEP}]" |
56 |
+BDEPEND="test? ( net-misc/memcached )" |
57 |
+ |
58 |
+distutils_enable_tests nose |
59 |
+ |
60 |
+python_test() { |
61 |
+ local pidfile="${TMPDIR}/memcached.pid" |
62 |
+ |
63 |
+ memcached -d -P "$pidfile" || die "failed to start memcached" |
64 |
+ |
65 |
+ nosetests -v || die "Tests fail with ${EPYTHON}" |
66 |
+ |
67 |
+ kill "$(<"$pidfile")" || die "failed to kill memcached" |
68 |
+ local elapsed=0 |
69 |
+ while [[ -f "$pidfile" ]]; do |
70 |
+ if [[ $elapsed -ge 30 ]]; then |
71 |
+ kill -KILL "$(<"$pidfile")" || die "failed to kill -KILL memcached" |
72 |
+ die "memcached failed to stop after 30 seconds" |
73 |
+ fi |
74 |
+ sleep 1 |
75 |
+ let elapsed++ |
76 |
+ done |
77 |
+} |