From fa1711963b1b54e0ce1dd47bc978a74e23494ef4 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jul 27 2019 10:39:05 +0000 Subject: 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 --- 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