#1 EPEL compatibility
Merged 5 years ago by kanarip. Opened 5 years ago by carlwgeorge.
rpms/ carlwgeorge/python-zope-testing epel-compat  into  master

file modified
+20 -20
@@ -6,13 +6,11 @@ 

  

  %global modname zope.testing

  

- %if 0%{?fedora}

- %global with_python3 1

- %endif

+ %bcond_without  python3

  

  Name:           python-zope-testing

  Version:        4.6.1

- Release:        7%{?dist}

+ Release:        8%{?dist}

  Summary:        Zope Testing Framework

  License:        ZPLv2.1

  URL:            https://pypi.io/project/%{modname}
@@ -40,20 +38,19 @@ 

  This package provides a number of testing frameworks. It includes a

  flexible test runner, and supports both doctest and unittest.

  

- %if 0%{?with_python3}

- %package -n python3-zope-testing

+ %if %{with python3}

+ %package -n python%{python3_pkgversion}-zope-testing

  Summary:        Zope Testing Framework

- %{?python_provide:%python_provide python3-zope-testing}

- 

- BuildRequires:  python3-devel

- BuildRequires:  python3-setuptools

- BuildRequires:  python3-zope-exceptions

- BuildRequires:  python3-zope-interface

+ %{?python_provide:%python_provide python%{python3_pkgversion}-zope-testing}

  

- Requires:       python3-zope-exceptions

- Requires:       python3-zope-interface

+ BuildRequires:  python%{python3_pkgversion}-devel

+ BuildRequires:  python%{python3_pkgversion}-setuptools

+ BuildRequires:  python%{python3_pkgversion}-zope-exceptions

+ BuildRequires:  python%{python3_pkgversion}-zope-interface

+ Requires:       python%{python3_pkgversion}-zope-exceptions

+ Requires:       python%{python3_pkgversion}-zope-interface

  

- %description -n python3-zope-testing

+ %description -n python%{python3_pkgversion}-zope-testing

  This package provides a number of testing frameworks. It includes a

  flexible test runner, and supports both doctest and unittest.

  %endif
@@ -65,7 +62,7 @@ 

  

  %build

  %{py2_build}

- %if 0%{?with_python3}

+ %if %{with python3}

  %{py3_build}

  %endif

  
@@ -73,7 +70,7 @@ 

  %{py2_install}

  # __init__.py* are not needed since .pth file is used

  rm -f %{buildroot}%{python2_sitelib}/zope/__init__.py*

- %if 0%{?with_python3}

+ %if %{with python3}

  %{py3_install}

  # __init__.py* are not needed since .pth file is used

  rm -f %{buildroot}%{python3_sitelib}/zope/__init__.py*
@@ -81,7 +78,7 @@ 

  

  %check

  %{__python2} setup.py test

- %if 0%{?with_python3}

+ %if %{with python3}

  %{__python3} setup.py test

  %endif

  
@@ -92,8 +89,8 @@ 

  %{python2_sitelib}/%{modname}-*.egg-info

  %{python2_sitelib}/%{modname}-*-nspkg.pth

  

- %if 0%{?with_python3}

- %files -n python3-zope-testing

+ %if %{with python3}

+ %files -n python%{python3_pkgversion}-zope-testing

  %doc COPYRIGHT.txt LICENSE.txt CHANGES.rst README.rst src/zope/testing/*.txt

  %{python3_sitelib}/zope/testing/

  %exclude %{python3_sitelib}/zope/testing/*.txt
@@ -102,6 +99,9 @@ 

  %endif

  

  %changelog

+ * Sat Mar 09 2019 Carl George <carl@george.computer> - 4.6.1-8

+ - EPEL compatibility

+ 

  * Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.1-7

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

  

EPEL has switched the python3 and python3_other macros, so packages will now build for python36 instead of python34. However during the mass rebuild we discovered that version of zope.testing in the epel7 branch (4.1.2) isn't compatible with Python 3.6. Upstream first added that in 4.6.1, which happens to be the version in the master branch. The easiest solution is to make master branch compatible with epel7, then merge it back to the epel7 branch.

Pull-Request has been merged by kanarip

5 years ago