%if 0%{?fedora} %global with_python3 1 %endif %{!?_licensedir: %global license %%doc} %if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %global modname zanata2fedmsg %global sum A web app bridging zanata webhooks to fedmsg Name: python-zanata2fedmsg Version: 0.2 Release: 1%{?dist} Summary: %{sum} License: GPLv2+ URL: http://pypi.python.org/pypi/zanata2fedmsg Source0: https://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %description %{sum} %package -n python2-%{modname} Summary: %{sum} %{?python_provide:%python_provide python2-%{modname}} Requires: python-flask Requires: python-fedmsg-core %description -n python2-%{modname} %{sum} %if 0%{?with_python3} %package -n python3-%{modname} Summary: %{sum} %{?python_provide:%python_provide python3-%{modname}} Requires: python3-flask Requires: python3-fedmsg-core %description -n python3-%{modname} %{sum} %endif %prep %autosetup -n %{modname}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif # This is just a dev tool. Don't package it. rm %{buildroot}/%{_bindir}/zanata2fedmsg-webhook-generator.py %files -n python2-%{modname} %doc README.rst %license COPYING %{python2_sitelib}/%{modname}.py* %{python2_sitelib}/%{modname}-%{version}* %if 0%{?with_python3} %files -n python3-%{modname} %doc README.rst %license COPYING %{python3_sitelib}/%{modname}.py* %{python3_sitelib}/%{modname}-%{version}* %{python3_sitelib}/__pycache__/*%{modname}* %endif %changelog * Mon Feb 22 2016 Ralph Bean - 0.1-1 - Initial package for Fedora