From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1284310-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 9497C1382C5
	for <garchives@archives.gentoo.org>; Thu, 20 May 2021 22:34:17 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DFAFDE0848;
	Thu, 20 May 2021 22:34:16 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C92A6E0848
	for <gentoo-commits@lists.gentoo.org>; Thu, 20 May 2021 22:34:16 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E006A340D2D
	for <gentoo-commits@lists.gentoo.org>; Thu, 20 May 2021 22:34:15 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 6544B581
	for <gentoo-commits@lists.gentoo.org>; Thu, 20 May 2021 22:34:14 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org>
Message-ID: <1621550051.a279b9164eb3deb062de4691f2930485faa44918.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/werkzeug/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild
X-VCS-Directories: dev-python/werkzeug/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: a279b9164eb3deb062de4691f2930485faa44918
X-VCS-Branch: master
Date: Thu, 20 May 2021 22:34:14 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 9fa43cde-ab12-47e2-830a-ea4ee01b8f87
X-Archives-Hash: e224479d8b8c0120d8975ce842aef988

commit:     a279b9164eb3deb062de4691f2930485faa44918
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu May 20 22:25:06 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May 20 22:34:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a279b916

dev-python/werkzeug: Use venv to test before install reliably

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

 dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild b/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild
index 38fc4aaa001..76e9a1859da 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