%global srcname pyngus
# Don't duplicate the same documentation
%global _docdir_fmt %{name}
Name: python-%{srcname}
Version: 2.0.3
Release: 4%{?dist}
Summary: Callback API implemented over Proton
License: ASL 2.0
URL: https://github.com/kgiusti/%{srcname}
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
%global _description \
A connection oriented messaging framework using QPID Proton.\
It provides a callback-based API for message passing.
%description %{_description}
%package -n python2-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{srcname}}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python-qpid-proton
Requires: python-qpid-proton
%description -n python2-%{srcname} %{_description}
Python 2 version.
%package -n python3-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{srcname}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-qpid-proton
Requires: python3-qpid-proton
%description -n python3-%{srcname} %{_description}
Python 3 version.
%prep
%autosetup -n %{srcname}-%{version}
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
# some number of tests doesn't work
pushd tests/
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} test-runner || :
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} test-runner || :
popd
%files -n python2-%{srcname}
%license LICENSE
%doc README.md examples/
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}-*.egg-info/
%files -n python3-%{srcname}
%license LICENSE
%doc README.md examples/
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}-*.egg-info/
%changelog
* Mon May 16 2016 Philip Worrall <philip.worrall@googlemail.com> - 2.0.3-4
- Add python3 subpackage (http://fedora.portingdb.xyz/pkg/python-pyngus/)
- Edit spec to use the python2/3 specific installation macros
- Add global macros for package name and summary
- Add calls to run the testsuite
- Point the source url at the upstream github repository (for license files)
* Wed Mar 23 2016 Irina Boverman <iboverma@redhat.com> - 2.0.3-3
- Rebuilt against qpid-proton 0.12.1
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Sep 21 2015 Irina Boverman <iboverma@redhat.com> - 2.0.3-1
- Rebased to 2.0.3
* Thu Sep 3 2015 Irina Boverman <iboverma@redhat.com> - 2.0.1-1
- Rebased to 2.0.1
- Rebuilt against proton 0.10
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Nov 12 2014 Darryl L. Pierce <dpierce@redhat.com> - 1.2.0-1
- Rebased on Pyngus 1.2.0.
* Wed Oct 1 2014 Darryl L. Pierce <dpierce@redhat.com> - 1.1.0-1
- First official build.
* Mon Sep 29 2014 Darryl L. Pierce <dpierce@redhat.com> - 1.1.0-0.1
- Replaced the python-qpid-proton requirement.
- Added egg info to the list of docs for this package.
* Thu Sep 25 2014 Darryl L. Pierce <dpierce@redhat.com> - 1.1.0-0
- Initial build.