diff --git a/python-docker-py.spec b/python-docker-py.spec index 65efac9..3a28e45 100644 --- a/python-docker-py.spec +++ b/python-docker-py.spec @@ -1,5 +1,7 @@ %if 0%{?fedora} %global with_python3 1 +%else %if 0%{?centos} +%global with_python3 0 %endif #fedora # disable debug package cause archful @@ -23,11 +25,13 @@ Patch2: remote-inspection.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools +%if 0%{?fedora} BuildRequires: python-mock >= 1.0.1 -BuildRequires: pytest >= 2.7.2 +BuildRequires: python-flake8 >= 2.4.1 BuildRequires: python-pytest-cov >= 2.1.0 +%endif # fedora +BuildRequires: pytest >= 2.7.2 BuildRequires: python-coverage >= 3.7.1 -BuildRequires: python-flake8 >= 2.4.1 BuildRequires: python-six >= 1.4.0 BuildRequires: python-websocket-client >= 0.32.0 @@ -84,7 +88,9 @@ A Python 3 interface to Docker %endif # with_python3 %check +%if 0%{?fedora} PYTHONPATH="${PWD}" py.test-%{python2_version} tests/unit/ +%endif %if 0%{?with_python3} PYTHONPATH="${PWD}" py.test-%{python3_version} tests/unit/