diff --git a/python-wrapt.spec b/python-wrapt.spec index 27f0782..139de7a 100644 --- a/python-wrapt.spec +++ b/python-wrapt.spec @@ -1,8 +1,10 @@ # Created by pyp2rpm-1.1.1 %global sname wrapt -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} >= 7 %global with_python3 1 +%endif +%if 0%{?fedora} %global with_docs 1 %endif @@ -10,7 +12,7 @@ Name: python-%{sname} Version: 1.10.4 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A Python module for decorators, wrappers and monkey patching License: BSD @@ -20,7 +22,11 @@ Source0: https://github.com/GrahamDumpleton/%{sname}/archive/%{version}.t BuildRequires: python2-devel %if 0%{?with_python3} -BuildRequires: python3-devel +BuildRequires: python3-pkgversion-macros +BuildRequires: python%{python3_pkgversion}-devel +%if 0%{?with_python3_other} +BuildRequires: python%{python3_other_pkgversion}-devel +%endif %endif %description @@ -40,14 +46,24 @@ Documentation for the wrapt module %endif %if 0%{?with_python3} -%package -n python3-wrapt +%package -n python%{python3_pkgversion}-wrapt +Summary: A Python module for decorators, wrappers and monkey patching + +%description -n python%{python3_pkgversion}-wrapt +The aim of the wrapt module is to provide a transparent object proxy +for Python, which can be used as the basis for the construction of +function wrappers and decorator functions. + +%if 0%{?with_python3_other} +%package -n python%{python3_other_pkgversion}-wrapt Summary: A Python module for decorators, wrappers and monkey patching -%description -n python3-wrapt +%description -n python%{python3_other_pkgversion}-wrapt The aim of the wrapt module is to provide a transparent object proxy for Python, which can be used as the basis for the construction of function wrappers and decorator functions. %endif +%endif %prep %setup -q -n %{sname}-%{version} @@ -64,6 +80,9 @@ CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build +%if 0%{?with_python3_other} +CFLAGS="$RPM_OPT_FLAGS" %{__python3_other} setup.py build +%endif popd %endif @@ -78,6 +97,9 @@ popd %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} +%if 0%{?with_python3_other} +%{__python3_other} setup.py install --skip-build --root %{buildroot} +%endif popd %endif %{__python2} setup.py install --skip-build --root %{buildroot} @@ -94,14 +116,26 @@ popd %endif %if 0%{?with_python3} -%files -n python3-wrapt +%files -n python%{python3_pkgversion}-wrapt %doc README %license LICENSE %{python3_sitearch}/%{sname} %{python3_sitearch}/%{sname}-%{version}-py?.?.egg-info + +%if 0%{?with_python3_other} +%files -n python%{python3_other_pkgversion}-wrapt +%doc README +%license LICENSE +%{python3_other_sitearch}/%{sname} +%{python3_other_sitearch}/%{sname}-%{version}-py?.?.egg-info +%endif %endif %changelog +* Thu Sep 15 2016 Aurelien Bompard - 1.10.4-7 +- Add support for Python3 in EPEL7: + https://fedoraproject.org/wiki/User:Bkabrda/EPEL7_Python3 + * Fri May 15 2015 Ralph Bean - 1.10.4-6 - Don't build docs on epel7 (the rtd theme is problematic).