%global srcname kaptan %global sum Configuration parser Name: python-%{srcname} Version: 0.5.5 Release: 1%{?dist} Summary: %{sum} License: BSD URL: https://pypi.python.org/pypi/%{srcname} Source0: https://github.com/emre/%{srcname}/archive/%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python3-devel BuildRequires: PyYAML BuildRequires: python3-PyYAML %description configuration parser. %package -n python2-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} configuration parser. %package -n python3-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} configuration parser. %prep %autosetup -n %{srcname}-%{version} %build %py2_build %py3_build %install # Must do the python2 install first because the scripts in /usr/bin are # overwritten with every setup.py install, and in general we want the # python3 version to be the default. %py2_install %py3_install %check %{__python2} setup.py test %{__python3} setup.py test # Note that there is no %%files section for the unversioned python module if we are building for several python runtimes # A man page has been requested upstream here: # https://github.com/emre/kaptan/issues/44 %files -n python2-%{srcname} %license LICENSE %doc README.md %{python2_sitelib}/* %files -n python3-%{srcname} %license LICENSE %doc README.md %{python3_sitelib}/* %{_bindir}/%{srcname} %changelog * Sat Dec 17 2016 David Roble 0.5.5-1 - Initial release