summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-05-21 00:25:06 +0200
committerMichał Górny <mgorny@gentoo.org>2021-05-21 00:34:11 +0200
commita279b9164eb3deb062de4691f2930485faa44918 (patch)
tree49a7582da290bb1e48d02965567ba6f6b7c926ce /dev-python/werkzeug
parentmedia-libs/liblastfm: Force c++14 to fix build with GCC-11 (diff)
downloadgentoo-a279b9164eb3deb062de4691f2930485faa44918.tar.gz
gentoo-a279b9164eb3deb062de4691f2930485faa44918.tar.bz2
gentoo-a279b9164eb3deb062de4691f2930485faa44918.zip
dev-python/werkzeug: Use venv to test before install reliably
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/werkzeug')
-rw-r--r--dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild13
1 files changed, 12 insertions, 1 deletions
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