From ca350323d8001f4ff6c6864646a8c84b32d3eb9f Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Aug 08 2017 20:10:29 +0000 Subject: Build for python3 in EPEL --- diff --git a/python-responses.spec b/python-responses.spec index 8805f2c..888be68 100644 --- a/python-responses.spec +++ b/python-responses.spec @@ -1,10 +1,7 @@ %global pypi_name responses %global sum Reusable django app for collecting and visualizing network topology -# Python 3 only for Fedora for now. -%if 0%{?fedora} > 12 %global with_python3 1 -%endif # python-setuptools is needed only in EPEL 7. In Fedora is already required by python package %if 0%{?el7} @@ -33,10 +30,10 @@ BuildRequires: python-requests BuildRequires: python-setuptools %endif %if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-cookies -BuildRequires: python3-requests -BuildRequires: python3-six +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-cookies +BuildRequires: python%{python3_pkgversion}-requests +BuildRequires: python%{python3_pkgversion}-six %endif # if with_python3 %description @@ -54,15 +51,15 @@ Requires: python-six A utility library for mocking out the requests Python library. %if 0%{?with_python3} -%package -n python3-%{pypi_name} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{sum} -%{?python_provide:%python_provide python3-%{pypi_name}} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} -Requires: python3-cookies -Requires: python3-requests -Requires: python3-six +Requires: python%{python3_pkgversion}-cookies +Requires: python%{python3_pkgversion}-requests +Requires: python%{python3_pkgversion}-six -%description -n python3-%{pypi_name} +%description -n python%{python3_pkgversion}-%{pypi_name} A utility library for mocking out the requests Python library. %endif # if with_python3 @@ -95,7 +92,7 @@ A utility library for mocking out the requests Python library. %{python2_sitelib}/* %if 0%{?with_python3} -%files -n python3-%{pypi_name} +%files -n python%{python3_pkgversion}-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitelib}/*