%global modname unidiff Name: python-%{modname} Version: 0.5.2 Release: 2%{?dist} Summary: Python library to parse and interact with unified diffs (patches) License: MIT URL: http://github.com/matiasb/python-unidiff Source0: http://pypi.python.org/packages/source/u/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-nose BuildRequires: python3-devel BuildRequires: python3-nose Patch1: 0001-don-t-install-tests-as-a-top-level-package.patch Patch2: 0002-use-setuptools-console_scripts-for-usr-bin-unidiff.patch %description python-unidiff is a Python library to parse and interact with unified diffs (patches). %package -n python2-%{modname} %{?python_provide:%python_provide python2-%{modname}} Summary: %{summary} %description -n python2-%{modname} python-unidiff is a Python library to parse and interact with unified diffs (patches). %package -n python3-%{modname} %{?python_provide:%python_provide python3-%{modname}} Summary: %{summary} %description -n python3-%{modname} python-unidiff is a Python library to parse and interact with unified diffs (patches). %prep %setup -q -n %{modname}-%{version} %patch1 -p1 %patch2 -p1 rm -r unidiff.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check # Tests fail due to missing samples directory: # https://github.com/matiasb/python-unidiff/pull/23 #%%{__python2} setup.py test #%%{__python3} setup.py test %files -n python2-%{modname} %license LICENSE %doc README.md %{python2_sitelib}/%{modname} %{python2_sitelib}/%{modname}*.egg-info %files -n python3-%{modname} %license LICENSE %doc README.md %{_bindir}/%{modname} %{python3_sitelib}/%{modname} %{python3_sitelib}/%{modname}*.egg-info %changelog * Wed Jun 29 2016 Dan Callaghan - 0.5.2-2 - use %%license and %%python_provide, wrap %%description * Fri Jun 17 2016 Dan Callaghan - 0.5.2-1 - initial version