Circular dependency on pytest, add bcond
This commit is contained in:
parent
13a39db950
commit
0d57d4096d
@ -10,11 +10,16 @@ Source0: %pypi_source
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-setuptools
|
BuildRequires: python2-setuptools
|
||||||
BuildRequires: python2-pytest
|
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
|
# Circular dependency on pytest
|
||||||
|
%bcond_without tests
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: python2-pytest
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%global _description\
|
%global _description\
|
||||||
@ -52,9 +57,11 @@ sed -ie '1d' %{pypi_name}/cli/chardetect.py
|
|||||||
rm %{buildroot}%{_bindir}/*
|
rm %{buildroot}%{_bindir}/*
|
||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
%{__python2} -m pytest -v
|
%{__python2} -m pytest -v
|
||||||
%{__python3} -m pytest -v
|
%{__python3} -m pytest -v
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n python2-%{pypi_name}
|
%files -n python2-%{pypi_name}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user