Switch to %pytest to simplify the spec file

/usr/bin/pip is Python 3 now anyway, so we can drop the custom _bin hack.
This commit is contained in:
Miro Hrončok 2020-07-08 11:00:46 +02:00
parent 8253bfab57
commit e195c51818

View File

@ -368,16 +368,11 @@ pytest_k='not completion and
not test_from_link_vcs_without_source_dir and not test_from_link_vcs_without_source_dir and
not test_should_cache_git_sha' not test_should_cache_git_sha'
mkdir _bin
export PATH="$PWD/_bin:$PATH"
export PYTHONPATH=%{buildroot}%{python3_sitelib}
ln -sf %{buildroot}%{_bindir}/pip3 _bin/pip
# --deselect'ed tests are not compatible with the latest virtualenv # --deselect'ed tests are not compatible with the latest virtualenv
# These files contain almost 500 tests so we should enable them back # These files contain almost 500 tests so we should enable them back
# as soon as pip will be compatible upstream # as soon as pip will be compatible upstream
# https://github.com/pypa/pip/pull/8441 # https://github.com/pypa/pip/pull/8441
%{__python3} -m pytest -m 'not network' -k "$(echo $pytest_k)" \ %pytest -m 'not network' -k "$(echo $pytest_k)" \
--deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py --deselect tests/functional --deselect tests/lib/test_lib.py --deselect tests/unit/test_build_env.py
%endif %endif