From a279b9164eb3deb062de4691f2930485faa44918 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 21 May 2021 00:25:06 +0200 Subject: dev-python/werkzeug: Use venv to test before install reliably MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'dev-python/werkzeug') diff --git a/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild b/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild index 38fc4aaa0012..76e9a1859dab 100644 --- a/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild +++ b/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild @@ -31,7 +31,6 @@ BDEPEND=" dev-python/pytest-timeout[${PYTHON_USEDEP}] dev-python/pytest-xprocess[${PYTHON_USEDEP}] dev-python/watchdog[${PYTHON_USEDEP}] - ~dev-python/werkzeug-${PV}[${PYTHON_USEDEP}] )" distutils_enable_tests pytest @@ -40,7 +39,19 @@ PATCHES=( "${FILESDIR}"/${P}-py310.patch ) +src_prepare() { + distutils-r1_src_prepare + # prevent esetup.py install from zipping the egg + sed -i -e '/\[options\]/azip_safe = False' setup.cfg || die +} + python_test() { + "${EPYTHON}" -m venv --system-site-packages --without-pip \ + "${BUILD_DIR}"/venv || die + local -x PATH=${BUILD_DIR}/venv/bin:${PATH} + unset PYTHONPATH + esetup.py install + # the default portage tempdir is too long for AF_UNIX sockets local -x TMPDIR=/tmp epytest -p no:httpbin tests -- cgit v1.2.3-65-gdbad