%global srcname lazr.delegates %global pkgname lazr-delegates %global summary Easily write objects that delegate behavior %global _description \ The lazr.delegates package makes it easy to write objects that delegate \ behavior to another object. The new object adds some property or behavior on \ to the other object, while still providing the underlying interface, and \ delegating behavior. # EPEL7 support: default Python is Python 2, and Python2 packages prefix # is unversioned. %if 0%{?rhel} && 0%{?rhel} <= 7 %global py2_namespace python %else %global py2_namespace python2 %endif Name: python-%{pkgname} Version: 2.0.3 Release: 1%{?dist} Summary: %{summary} License: LGPLv3 URL: https://launchpad.net/lazr.delegates Source0: https://files.pythonhosted.org/packages/source/l/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: %{py2_namespace}-devel BuildRequires: %{py2_namespace}-setuptools BuildRequires: %{py2_namespace}-nose BuildRequires: %{py2_namespace}-zope-interface # Python3 BuildRequires: python3-pkgversion-macros BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-nose BuildRequires: python%{python3_pkgversion}-zope-interface %if 0%{?with_python3_other} BuildRequires: python%{python3_other_pkgversion}-devel BuildRequires: python%{python3_other_pkgversion}-setuptools BuildRequires: python%{python3_other_pkgversion}-nose BuildRequires: python%{python3_other_pkgversion}-zope-interface %endif %description %{_description} %if %{py2_namespace} != python %package -n %{py2_namespace}-%{pkgname} Summary: %{summary} %{?python_provide:%python_provide python2-%{pkgname}} Requires: %{py2_namespace}-setuptools Requires: %{py2_namespace}-nose Requires: %{py2_namespace}-zope-interface %description -n %{py2_namespace}-%{pkgname} %{_description} %endif %package -n python%{python3_pkgversion}-%{pkgname} Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}} Requires: python%{python3_pkgversion}-setuptools Requires: python%{python3_pkgversion}-nose Requires: python%{python3_pkgversion}-zope-interface %description -n python%{python3_pkgversion}-%{pkgname} %{_description} %if 0%{?with_python3_other} %package -n python%{python3_other_pkgversion}-%{pkgname} Summary: %{summary} %{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pkgname}} Requires: python%{python3_other_pkgversion}-setuptools Requires: python%{python3_other_pkgversion}-nose Requires: python%{python3_other_pkgversion}-zope-interface %description -n python%{python3_other_pkgversion}-%{pkgname} %{_description} %endif %prep %autosetup -n %{srcname}-%{version} %build %py2_build %py3_build %if 0%{?with_python3_other} %py3_other_build %endif %install %py2_install %py3_install %if 0%{?with_python3_other} %py3_other_install %endif # Remove the python3-specific file from the Python2 package rm %{buildroot}%{python2_sitelib}/lazr/delegates/_python3.py %check %{__python2} setup.py nosetests %{__python3} setup.py nosetests %if 0%{?with_python3_other} %{__python3_other} setup.py nosetests %endif %files -n %{py2_namespace}-%{pkgname} %license COPYING.txt %doc README.rst HACKING.rst %{python2_sitelib}/lazr/ %{python2_sitelib}/%{srcname}-%{version}*-py%{python2_version}.egg-info/ %{python2_sitelib}/%{srcname}-%{version}*-py%{python2_version}-nspkg.pth %files -n python%{python3_pkgversion}-%{pkgname} %license COPYING.txt %doc README.rst HACKING.rst %{python3_sitelib}/lazr/ %{python3_sitelib}/%{srcname}-%{version}*-py%{python3_version}.egg-info/ %{python3_sitelib}/%{srcname}-%{version}*-py%{python3_version}-nspkg.pth %if 0%{?with_python3_other} %files -n python%{python3_other_pkgversion}-%{pkgname} %license COPYING.txt %doc README.rst HACKING.rst %{python3_other_sitelib}/lazr/ %{python3_other_sitelib}/%{srcname}-%{version}*-py%{python3_other_version}.egg-info/ %{python3_other_sitelib}/%{srcname}-%{version}*-py%{python3_other_version}-nspkg.pth %endif %changelog * Wed Sep 14 2016 Aurelien Bompard - 2.0.3-1 - Initial package.