Disable tests by default in RHEL builds
Some of the test dependencies are unwanted in RHEL.
This commit is contained in:
parent
b62337fec6
commit
f2f84f8ff4
@ -1,3 +1,10 @@
|
|||||||
|
# some test dependencies are unwanted in RHEL
|
||||||
|
%if 0%{?rhel}
|
||||||
|
%bcond_with tests
|
||||||
|
%else
|
||||||
|
%bcond_without tests
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: micropipenv
|
Name: micropipenv
|
||||||
Version: 1.5.0
|
Version: 1.5.0
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
@ -26,7 +33,7 @@ converting them to pip-tools compatible output.
|
|||||||
sed -i '1{\@^#!/usr/bin/env python@d}' %{name}.py
|
sed -i '1{\@^#!/usr/bin/env python@d}' %{name}.py
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%pyproject_buildrequires -r -t -x toml
|
%pyproject_buildrequires -r %{?with_tests:-t} -x toml
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
@ -36,8 +43,12 @@ sed -i '1{\@^#!/usr/bin/env python@d}' %{name}.py
|
|||||||
%pyproject_save_files %{name}
|
%pyproject_save_files %{name}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with tests}
|
||||||
# skipped tests requires internet or checks pip version
|
# skipped tests requires internet or checks pip version
|
||||||
%pytest -m "not online" -k "not test_check_pip_version and not test_install_invalid_toml_file"
|
%pytest -m "not online" -k "not test_check_pip_version and not test_install_invalid_toml_file"
|
||||||
|
%else
|
||||||
|
%pyproject_check_import
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -f %pyproject_files
|
%files -f %pyproject_files
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
|
Loading…
Reference in New Issue
Block a user