From 98ac4480d53bf586291a70e29883215075724496 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Apr 19 2019 13:24:20 +0000 Subject: Prepare for python3 build in EPEL --- diff --git a/python-f5-icontrol-rest.spec b/python-f5-icontrol-rest.spec index 6e71baa..6398194 100644 --- a/python-f5-icontrol-rest.spec +++ b/python-f5-icontrol-rest.spec @@ -2,10 +2,10 @@ %global sum F5 BIG-IP iControl REST API client %if 0%{?fedora} <= 29 && 0%{?rhel} <= 7 -%global with_python2 1 +%bcond_without python2 %endif %if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python3 1 +%bcond_without python3 %endif Name: python-%{srcname} @@ -64,25 +64,25 @@ BuildRequires: python2-requests-mock %endif %if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-requests >= 2.5.0 -BuildRequires: python3-urllib3 +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-requests >= 2.5.0 +BuildRequires: python%{python3_pkgversion}-urllib3 # doc -BuildRequires: python3-sphinx -BuildRequires: python3-sphinx_rtd_theme +BuildRequires: python%{python3_pkgversion}-sphinx +BuildRequires: python%{python3_pkgversion}-sphinx_rtd_theme # tests -BuildRequires: python3-coveralls -BuildRequires: python3-flake8 -BuildRequires: python3-mccabe -BuildRequires: python3-mock -BuildRequires: python3-pep8 -BuildRequires: python3-pyflakes -BuildRequires: python3-pytest -BuildRequires: python3-pytest-cov +BuildRequires: python%{python3_pkgversion}-coveralls +BuildRequires: python%{python3_pkgversion}-flake8 +BuildRequires: python%{python3_pkgversion}-mccabe +BuildRequires: python%{python3_pkgversion}-mock +BuildRequires: python%{python3_pkgversion}-pep8 +BuildRequires: python%{python3_pkgversion}-pyflakes +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-pytest-cov # Not packaged yet... -#BuildRequires: python3-pytest-symbols -BuildRequires: python3-requests-mock +#BuildRequires: python%{python3_pkgversion}-pytest-symbols +BuildRequires: python%{python3_pkgversion}-requests-mock %endif @@ -102,12 +102,12 @@ with BIG-IP® via the REST API. %endif %if 0%{?with_python3} -%package -n python3-%{srcname} +%package -n python%{python3_pkgversion}-%{srcname} Summary: %{sum} -%{?python_provide:%python_provide python3-%{srcname}} -Requires: python3-requests >= 2.5.0 +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} +Requires: python%{python3_pkgversion}-requests >= 2.5.0 -%description -n python3-%{srcname} +%description -n python%{python3_pkgversion}-%{srcname} Generic python library used by the F5 SDK and other F5 projects to communicate with BIG-IP® via the REST API. %endif @@ -159,7 +159,7 @@ rm build/sphinx/html/.buildinfo %endif %if 0%{?with_python3} -%files -n python3-%{srcname} +%files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc CONTRIBUTING.md README.rst SUPPORT.md %doc build/sphinx/html/ @@ -170,6 +170,7 @@ rm build/sphinx/html/.buildinfo %changelog * Fri Apr 19 2019 Xavier Bachelot - 1.3.13-1 - Update to 1.3.13. +- Prepare for python3 build in EPEL. * Sat Feb 02 2019 Fedora Release Engineering - 1.3.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild