Only enable tests on Fedora.
This commit is contained in:
parent
a78dc50b11
commit
4669cc950d
@ -1,6 +1,7 @@
|
|||||||
%if (! 0%{?rhel}) || 0%{?rhel} > 7
|
%if (! 0%{?rhel}) || 0%{?rhel} > 7
|
||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
%global build_wheel 1
|
%global build_wheel 1
|
||||||
|
%global with_tests 1
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?rhel} && 0%{?rhel} < 6
|
%if 0%{?rhel} && 0%{?rhel} < 6
|
||||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||||
@ -16,7 +17,7 @@
|
|||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 1.5.6
|
Version: 1.5.6
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
Summary: A tool for installing and managing Python packages
|
Summary: A tool for installing and managing Python packages
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -39,10 +40,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
|
%if 0%{?with_tests}
|
||||||
BuildRequires: python-mock
|
BuildRequires: python-mock
|
||||||
BuildRequires: pytest
|
BuildRequires: pytest
|
||||||
BuildRequires: python-scripttest
|
BuildRequires: python-scripttest
|
||||||
BuildRequires: python-virtualenv
|
BuildRequires: python-virtualenv
|
||||||
|
%endif
|
||||||
%if 0%{?build_wheel}
|
%if 0%{?build_wheel}
|
||||||
BuildRequires: python-pip
|
BuildRequires: python-pip
|
||||||
BuildRequires: python-wheel
|
BuildRequires: python-wheel
|
||||||
@ -130,8 +133,10 @@ pip2 install -I dist/%{python2_wheelname} --root %{buildroot} --strip-file-prefi
|
|||||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?with_tests}
|
||||||
%check
|
%check
|
||||||
python setup.py test
|
python setup.py test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
@ -156,6 +161,9 @@ python setup.py test
|
|||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 18 2014 Slavek Kabrda <bkabrda@redhat.com> - 1.5.6-5
|
||||||
|
- Only enable tests on Fedora.
|
||||||
|
|
||||||
* Mon Dec 01 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.6-4
|
* Mon Dec 01 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.5.6-4
|
||||||
- Add tests
|
- Add tests
|
||||||
- Add patch skipping tests requiring Internet access
|
- Add patch skipping tests requiring Internet access
|
||||||
|
Loading…
Reference in New Issue
Block a user