Add %check, but keep it bconded out for now

epel9
Miro Hrončok 6 years ago
parent c2c5bce7b0
commit c5ffca7712

@ -30,6 +30,19 @@ BuildRequires: python3-sphinx_rtd_theme
BuildRequires: python3-towncrier
%endif
# we don't have all the dependencies
# some tests also need internet connection
%bcond_with tests
%if %{with tests}
BuildRequires: python3-pytest
BuildRequires: python3-pytest-xdist
BuildRequires: csh
BuildRequires: fish
#BuildRequires: xonsh -- the xonsh tests are failing :(
#BuildRequires: python3-pypiserver -- not available yet
#BuildRequires: python3-pytest-localserver -- not available yet
%endif
# RPM installed wheels
BuildRequires: python-pip-wheel
BuildRequires: python-setuptools-wheel
@ -122,6 +135,22 @@ rm %{buildroot}/%{_bindir}/virtualenv
%{py3_install}
%if %{with tests}
%check
mkdir tmp_path
ln -s $(realpath %{__python3}) tmp_path/python
export PATH="$(pwd)/tmp_path:$PATH"
export PYTHONPATH="$(pwd)"
unset SOURCE_DATE_EPOCH
cp -p /usr/share/python-wheels/*.whl virtualenv_support
# test_missing_certifi_pem patches bundled pip wheel, but ours is patched already
# test_always_copy_option https://github.com/pypa/virtualenv/issues/1332
python -m pytest -vv -n auto -k "not test_missing_certifi_pem and not test_always_copy_option"
rm virtualenv_support/*.whl
rm -r tmp_path
%endif
%files -n python2-virtualenv
%license LICENSE.txt

Loading…
Cancel
Save