commit:     e80f4f7deb3bffe4a786a106fa28933acc1c6089
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 15 07:16:30 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jan 15 07:16:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e80f4f7d

dev-python/python-memcached: Bump to 1.62

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

 dev-python/python-memcached/Manifest               |  1 +
 .../python-memcached/python-memcached-1.62.ebuild  | 50 ++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diff --git a/dev-python/python-memcached/Manifest 
b/dev-python/python-memcached/Manifest
index 56ca0e6f8fc4..764eb87253b0 100644
--- a/dev-python/python-memcached/Manifest
+++ b/dev-python/python-memcached/Manifest
@@ -1 +1,2 @@
 DIST python-memcached-1.61.gh.tar.gz 29238 BLAKE2B 
4b24ae56716a0c17297c2041e26c555e0e675d87d3e77f75fd33e60f9c7f3791f1e4ef0e8fcaf0f895a2dce2f5539ddf5a6d2e42d3198a71d5edcc9a52716442
 SHA512 
ea66a04129816863d700718ae525838b381aaca6da3a239e3b2ff5cfc92297083a4b66fe0a10c1460f597e066b3d30902cdab1c38999be49b77d745a078d1da2
+DIST python-memcached-1.62.gh.tar.gz 28598 BLAKE2B 
4251931d4e77e83b959d1d3c23d96b532083ebe86e23c25e899185485de59348994041529c03be22be412128657e8bac9edd326b81a218113c465d69e4ae2b4f
 SHA512 
0394a3c6c1521e2dd5ce27953ebe285ab6ffc514ea64f8da22e9e630d01d49e975f5f81e8fc12080424a35409f7b39b4d8a0ff9893ab4b4985bad1005c6c1026

diff --git a/dev-python/python-memcached/python-memcached-1.62.ebuild 
b/dev-python/python-memcached/python-memcached-1.62.ebuild
new file mode 100644
index 000000000000..3cb07a112912
--- /dev/null
+++ b/dev-python/python-memcached/python-memcached-1.62.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( pypy3 python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Pure python memcached client"
+HOMEPAGE="
+       https://github.com/linsomniac/python-memcached/
+       https://pypi.org/project/python-memcached/
+"
+SRC_URI="
+       https://github.com/linsomniac/python-memcached/archive/${PV}.tar.gz
+               -> ${P}.gh.tar.gz
+"
+
+LICENSE="PSF-2.4"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+BDEPEND="
+       test? (
+               net-misc/memcached
+       )
+"
+
+distutils_enable_tests unittest
+
+python_test() {
+       local pidfile="${TMPDIR}/memcached.pid"
+
+       memcached -d -P "${pidfile}" || die "failed to start memcached"
+
+       eunittest || die "Tests fail with ${EPYTHON}"
+
+       kill "$(<"${pidfile}")" || die "failed to kill memcached"
+       local elapsed=0
+       while [[ -f ${pidfile} ]]; do
+               if [[ $(( elapsed++ )) -ge 30 ]]; then
+                       kill -KILL "$(<"${pidfile}")" ||
+                               die "failed to kill -KILL memcached"
+                       die "memcached failed to stop after 30 seconds"
+               fi
+               sleep 1
+       done
+}

Reply via email to