%if 0%{?fedora} %global py2 2 # XXX - No python3 support for now until python3-jira is available. Working on it! %global with_python3 0 %endif %{!?_licensedir: %global license %%doc} %global modname sync2jira %global sum Sync pagure and github issues to jira, via fedmsg Name: python-sync2jira Version: 0.1 Release: 1%{?dist} Summary: %{sum} License: LGPLv2+ URL: https://pypi.io/pypi/sync2jira Source0: https://pypi.io/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz Buildarch: noarch %if 0%{?fedora} BuildRequires: python%{py2}-devel BuildRequires: python%{py2}-setuptools BuildRequires: python%{py2}-fedmsg-core BuildRequires: python%{py2}-requests BuildRequires: python%{py2}-nose BuildRequires: python%{py2}-mock #BuildRequires: python%{py2}-jira BuildRequires: python-jira %endif %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-fedmsg-core BuildRequires: python3-requests BuildRequires: python3-nose BuildRequires: python3-mock BuildRequires: python3-jira %endif %description This is a process that listens to activity on upstream repos on pagure and github via fedmsg, and syncs new issues there to a Jira instance elsewhere. Configuration is in /etc/fedmsg.d/. You can maintain a mapping there that allows you to match one upstream repo (say, 'pungi' on pagure) to a downstream project/component pair in Jira (say, 'COMPOSE', and 'Pungi'). %package -n python2-%{modname} Summary: %{sum} %{?python_provide:%python_provide python2-%{modname}} Requires: python%{py2}-requests Requires: python%{py2}-jira Requires: python%{py2}-fedmsg-core %description -n python2-%{modname} This is a process that listens to activity on upstream repos on pagure and github via fedmsg, and syncs new issues there to a Jira instance elsewhere. Configuration is in /etc/fedmsg.d/. You can maintain a mapping there that allows you to match one upstream repo (say, 'pungi' on pagure) to a downstream project/component pair in Jira (say, 'COMPOSE', and 'Pungi'). %if 0%{?with_python3} %package -n python3-%{modname} Summary: %{sum} %{?python_provide:%python_provide python3-%{modname}} Requires: python3-requests Requires: python3-jira Requires: python3-fedmsg-core %description -n python3-%{modname} This is a process that listens to activity on upstream repos on pagure and github via fedmsg, and syncs new issues there to a Jira instance elsewhere. Configuration is in /etc/fedmsg.d/. You can maintain a mapping there that allows you to match one upstream repo (say, 'pungi' on pagure) to a downstream project/component pair in Jira (say, 'COMPOSE', and 'Pungi'). %endif %prep %autosetup -n %{modname}-%{version} # The egg name is all screwy here... sed -i '/jira/d' requirements.txt %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %check %{__python2} setup.py test %if 0%{?with_python3} %{__python3} setup.py test %endif %files -n python2-%{modname} %doc README.rst %license LICENSE %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{modname}-%{version}* %{_bindir}/sync2jira %if 0%{?with_python3} %files -n python3-%{modname} %doc README.rst %license LICENSE %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}* %endif %changelog * Tue May 10 2016 Ralph Bean - 0.1-1 - Initial packaging for Fedora