%global srcname tag2distrepo %global sum Fedmsg Consumer to automatically regenerate distrepos on tag operations Name: python-%{srcname} Version: 1 Release: 0.1%{?dist} Summary: %{sum} License: GPLv2+ URL: https://pagure.io/releng/tag2distrepo Source0: %{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel python3-devel BuildRequires: python2-fedmsg python3-fedmsg BuildRequires: python2-koji python3-koji %description %{sum} %package -n python2-%{srcname} Summary: %{sum} Requires: python2-fedmsg Requires: python2-koji %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} %{sum} %package -n python3-%{srcname} Summary: %{sum} Requires: python3-fedmsg Requires: python3-koji %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %{sum} %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. # If, however, we're installing separate executables for python2 and python3, # the order needs to be reversed so the unversioned executable is the python2 one. %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 %files -n python2-%{srcname} %license LICENSE %{python2_sitelib}/* %files -n python3-%{srcname} %license LICENSE %{python3_sitelib}/* %changelog * Fri Oct 06 2017 Patrick Uiterwijk - 1-0.2 - Initial packaging