summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-05-22 12:27:47 +0200
committerMichał Górny <mgorny@gentoo.org>2022-05-22 12:46:23 +0200
commit7d0d3093ca71c19787b12fe4b1b0b962e3cede53 (patch)
tree6d68205a95eaec9247be61e5c329211506bd0931 /dev-python/pylibmc
parentdev-python/pytest-services: Use PEP517 build (diff)
downloadgentoo-7d0d3093ca71c19787b12fe4b1b0b962e3cede53.tar.gz
gentoo-7d0d3093ca71c19787b12fe4b1b0b962e3cede53.tar.bz2
gentoo-7d0d3093ca71c19787b12fe4b1b0b962e3cede53.zip
dev-python/pylibmc: Switch to pytest
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pylibmc')
-rw-r--r--dev-python/pylibmc/Manifest1
-rw-r--r--dev-python/pylibmc/pylibmc-1.6.1-r2.ebuild50
2 files changed, 31 insertions, 20 deletions
diff --git a/dev-python/pylibmc/Manifest b/dev-python/pylibmc/Manifest
index 68a4f2e095a6..132d9d866ba2 100644
--- a/dev-python/pylibmc/Manifest
+++ b/dev-python/pylibmc/Manifest
@@ -1 +1,2 @@
+DIST pylibmc-1.6.1-no-nose.patch 26090 BLAKE2B 160e5b58107dcea0354462370eeeb12739c7fd1549e1c64ddf1fe2451654e50c1408505985eb6a7150ce60185bc7acebba7a20c6444615bef8c6991debfba4cc SHA512 84fb37505def84caaacb1343032d18bd644f5072e6ce7a2d6e88bc33bd2dedc8b303f4cf2a9b57b32c3c4b8e01bef1bebcc09ecb525568c928aed326bee2cace
DIST pylibmc-1.6.1.tar.gz 72061 BLAKE2B ebaa6f9dfc341d862a8b46bbbf0db1420ff400cb40390f7bee6bf198ff941ad7967b578040ffe1209721ea84a163a39649108a2a23f3dadc2d579db740b2ccf3 SHA512 a3874435389486b29bab5f1d29e5c179d67655d90995bb27fcb7cd46ce7eb3b60117b94f901602f8a65dc0e587d5f8edfcf15e259effd439411adb58ddb7065e
diff --git a/dev-python/pylibmc/pylibmc-1.6.1-r2.ebuild b/dev-python/pylibmc/pylibmc-1.6.1-r2.ebuild
index dd3d4aa2ac54..348df4925a33 100644
--- a/dev-python/pylibmc/pylibmc-1.6.1-r2.ebuild
+++ b/dev-python/pylibmc/pylibmc-1.6.1-r2.ebuild
@@ -12,41 +12,41 @@ DESCRIPTION="Libmemcached wrapper written as a Python extension"
HOMEPAGE="
https://sendapatch.se/projects/pylibmc/
https://pypi.org/project/pylibmc/
- https://github.com/lericson/pylibmc/"
-# One image is missing from the doc at PyPI
-# https://github.com/lericson/pylibmc/pull/221
-SRC_URI="https://github.com/lericson/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+ https://github.com/lericson/pylibmc/
+"
+SRC_URI="
+ https://github.com/lericson/pylibmc/archive/${PV}.tar.gz
+ -> ${P}.tar.gz
+ https://github.com/lericson/pylibmc/pull/263.patch
+ -> ${P}-no-nose.patch
+"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ~ppc64 x86"
-RDEPEND=">=dev-libs/libmemcached-0.32"
-# Older sphinx versions fail to compile the doc
-# https://github.com/sphinx-doc/sphinx/issues/3266
-DEPEND="${RDEPEND}"
+DEPEND="
+ >=dev-libs/libmemcached-0.32
+"
+RDEPEND="
+ ${DEPEND}
+"
BDEPEND="
test? (
net-misc/memcached
- )"
+ )
+"
PATCHES=(
"${FILESDIR}/pylibmc-1.6.1-fix-test-failures-r1.patch"
+ "${DISTDIR}/${P}-no-nose.patch"
)
distutils_enable_sphinx docs
-distutils_enable_tests nose
+distutils_enable_tests pytest
-python_prepare_all() {
- sed -e "/with-info=1/d" -i setup.cfg || die
-
- # some amazon thing, expects to be in AWS
- rm tests/test_autoconf.py || die
- distutils-r1_python_prepare_all
-
- # needed for docs
- export PYLIBMC_DIR=.
-}
+# needed for docs
+export PYLIBMC_DIR=.
src_test() {
local -x MEMCACHED_PORT=11219
@@ -55,3 +55,13 @@ src_test() {
distutils-r1_src_test
kill "$(<"${T}/m.pid")" || die
}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # these require "AmazonElastiCache" running
+ tests/test_autoconf.py
+ )
+
+ epytest --doctest-modules --doctest-glob='doctests.txt' \
+ src/pylibmc tests
+}