From fa1711963b1b54e0ce1dd47bc978a74e23494ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 27 Jul 2019 12:39:05 +0200 Subject: [PATCH] Workaround import mishmash in %check The namespace sphinxcontrib package made this problematic, because the package in $pwd was not namespace, but regular. Alternatively, sphinxcontrib/__init__.py could have been deleted, but not in %prep, because the package does not install without it. This solution makes sure we are testing what we are shipping. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1733681 --- python-sphinxcontrib-websupport.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python-sphinxcontrib-websupport.spec b/python-sphinxcontrib-websupport.spec index 8ae0e70..2d11137 100644 --- a/python-sphinxcontrib-websupport.spec +++ b/python-sphinxcontrib-websupport.spec @@ -50,7 +50,11 @@ rm -rf %{pypi_name}.egg-info %py3_install %check -%{__python3} -m pytest tests/ +mkdir empty && pushd empty # don't run the tests from sources +export PYTHONPATH=%{buildroot}%{python3_sitelib} +%{__python3} -m pytest ../tests +popd +rmdir empty %files -n python3-%{pypi_name} %license LICENSE