c674b04
%if 0%{?fedora} || 0%{?rhel} > 7
41c37ab
%global with_python3 1
53b17d3
%global with_tests 1
41c37ab
%else
53b17d3
%global with_tests 0
41c37ab
# These Sphinx docs do not build with python-sphinx 0.6 (el6)
41c37ab
%endif
dab33df
%global sphinx_docs 0
41c37ab
41c37ab
%global srcname amqp
41c37ab
41c37ab
Name:           python-%{srcname}
cd4e387
Version:        2.3.2
5ed9938
Release:        3%{?dist}
41c37ab
Summary:        Low-level AMQP client for Python (fork of amqplib)
41c37ab
41c37ab
Group:          Development/Languages
41c37ab
License:        LGPLv2+
41c37ab
URL:            http://pypi.python.org/pypi/amqp
dab33df
Source0:        https://files.pythonhosted.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz
41c37ab
BuildArch:      noarch
41c37ab
41c37ab
%if 0%{?sphinx_docs}
41c37ab
BuildRequires:  python-sphinx >= 0.8
41c37ab
%endif
41c37ab
41c37ab
dab33df
41c37ab
%description
41c37ab
Low-level AMQP client for Python
41c37ab
41c37ab
This is a fork of amqplib, maintained by the Celery project.
41c37ab
41c37ab
This library should be API compatible with librabbitmq.
41c37ab
dab33df
dab33df
%package -n python2-%{srcname}
dab33df
Summary:     Client library for AMQP
185a1d0
Requires:    python2-vine >= 1.1.3
dab33df
BuildRequires:  python2-devel
dab33df
BuildRequires:  python2-setuptools
dab33df
BuildRequires:  python2-nose
53b17d3
%if 0%{?with_tests}
53b17d3
BuildRequires:  python2-case
53b17d3
BuildRequires:  python2-pytest
53b17d3
BuildRequires:  python2-mock
53b17d3
BuildRequires:  python2-vine
53b17d3
%endif
dab33df
%{?python_provide:%python_provide python2-%{srcname}}
dab33df
dab33df
%description -n python2-%{srcname}
dab33df
Low-level AMQP client for Python
dab33df
dab33df
This is a fork of amqplib, maintained by the Celery project.
dab33df
dab33df
This library should be API compatible with librabbitmq.
dab33df
dab33df
41c37ab
%if 0%{?with_python3}
41c37ab
%package -n python3-%{srcname}
41c37ab
Summary:        Client library for AMQP
41c37ab
BuildRequires:  python3-devel
41c37ab
BuildRequires:  python3-setuptools
41c37ab
BuildRequires:  python3-nose
53b17d3
%if 0%{?with_tests}
53b17d3
BuildRequires:  python3-case
53b17d3
BuildRequires:  python3-pytest
53b17d3
BuildRequires:  python3-mock
53b17d3
BuildRequires:  python3-vine
53b17d3
%endif
41c37ab
%if 0%{?sphinx_docs}
41c37ab
BuildRequires:  python3-sphinx >= 0.8
41c37ab
%endif
dab33df
%{?python_provide:%python_provide python3-%{srcname}}
185a1d0
Requires:    python3-vine >= 1.1.3
41c37ab
41c37ab
%description -n python3-%{srcname}
41c37ab
Low-level AMQP client for Python
41c37ab
41c37ab
This is a fork of amqplib, maintained by the Celery project.
41c37ab
41c37ab
This library should be API compatible with librabbitmq.
41c37ab
41c37ab
%endif
41c37ab
dab33df
%package doc
dab33df
Summary:        Documentation for python-amqp
dab33df
Group:          Documentation
dab33df
dab33df
Requires:       %{name} = %{version}-%{release}
dab33df
dab33df
%description doc
dab33df
Documentation for python-amqp
dab33df
41c37ab
41c37ab
%prep
dab33df
%autosetup -n %{srcname}-%{version}
41c37ab
41c37ab
41c37ab
%build
dab33df
%py2_build
41c37ab
%if 0%{?with_python3}
dab33df
%py3_build
41c37ab
%endif
41c37ab
41c37ab
41c37ab
41c37ab
%install
dab33df
%py2_install
41c37ab
%if 0%{?with_python3}
dab33df
%py3_install
41c37ab
%endif
41c37ab
41c37ab
# docs generation requires everything to be installed first
41c37ab
export PYTHONPATH="$( pwd ):$PYTHONPATH"
41c37ab
41c37ab
41c37ab
%if 0%{?sphinx_docs}
41c37ab
pushd docs
41c37ab
41c37ab
# Disable extensions to prevent intersphinx from accessing net during build.
41c37ab
# Other extensions listed are not used.
41c37ab
sed -i s/^extensions/disable_extensions/ conf.py
41c37ab
41c37ab
SPHINX_DEBUG=1 sphinx-build -b html . build/html
41c37ab
rm -rf build/html/.doctrees build/html/.buildinfo
41c37ab
41c37ab
popd
41c37ab
%endif
41c37ab
53b17d3
%check
53b17d3
%if 0%{?with_tests}
53b17d3
# Skip test_transport because the "patching" fixture
53b17d3
# is not loading currently for python2.
53b17d3
py.test-2 t/unit -k "not test_transport"
53b17d3
%if 0%{?with_python3}
53b17d3
py.test-3 t/unit
53b17d3
%endif
53b17d3
%endif
53b17d3
dab33df
%files -n python2-%{srcname}
dab33df
%doc Changelog README.rst
dab33df
%license LICENSE
dab33df
%{python2_sitelib}/%{srcname}
dab33df
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info
41c37ab
41c37ab
%if 0%{?with_python3}
41c37ab
%files -n python3-%{srcname}
dab33df
%doc Changelog README.rst
dab33df
%license LICENSE
dab33df
%{python3_sitelib}/%{srcname}
dab33df
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info
41c37ab
%endif
41c37ab
41c37ab
%files doc
dab33df
%license LICENSE
41c37ab
%if 0%{?sphinx_docs}
41c37ab
%doc docs/build/html docs/reference
41c37ab
%endif
41c37ab
41c37ab
41c37ab
%changelog
5ed9938
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.2-3
5ed9938
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
5ed9938
43a67e7
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.3.2-2
43a67e7
- Rebuilt for Python 3.7
43a67e7
cd4e387
* Thu May 31 2018 Eric Harney <eharney@redhat.com> - 2.3.2-1
cd4e387
- Update to 2.3.2
cd4e387
cd4e387
* Tue May 29 2018 Eric Harney <eharney@redhat.com> - 2.3.1-1
aa7be51
- Update to 2.3.1
aa7be51
d048797
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.2-3
d048797
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d048797
c674b04
* Tue Jan 16 2018 Eric Harney <eharney@redhat.com> - 2.2.2-2
c674b04
- Enable py3 build for el8
c674b04
185a1d0
* Tue Oct 24 2017 Eric Harney <eharney@redhat.com> - 2.2.2-1
185a1d0
- Update to 2.2.2
185a1d0
b481f9f
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-3
b481f9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b481f9f
53b17d3
* Fri Jul 14 2017 Eric Harney <eharney@redhat.com> - 2.2.1-2
53b17d3
- Enable unit tests
53b17d3
bece5f5
* Fri Jul 14 2017 Eric Harney <eharney@redhat.com> - 2.2.1-1
bece5f5
- Update to 2.2.1
bece5f5
b219e94
* Thu Jul 13 2017 Eric Harney <eharney@redhat.com> - 2.2.0-1
b219e94
- Update to 2.2.0
b219e94
dab33df
* Wed Feb 08 2017 Matthias Runge <mrunge@redhat.com> - 2.1.4-1
dab33df
- upgrade to 2.1.4 (rhbz#1340298)
dab33df
- modernize spec, add provides (rhbz#1399248)
dab33df
2ac1dc9
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.4.9-4
2ac1dc9
- Rebuild for Python 3.6
2ac1dc9
8e316d0
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.9-3
8e316d0
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
8e316d0
7a7ebb8
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.9-2
7a7ebb8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7a7ebb8
652151d
* Fri Jan 15 2016 Eric Harney <eharney@redhat.com> - 1.4.9-1
652151d
- Update to 1.4.9
652151d
b3b24ff
* Thu Jan 07 2016 Eric Harney <eharney@redhat.com> - 1.4.8-1
b3b24ff
- Update to 1.4.8
b3b24ff
f560707
* Thu Nov 12 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-2
f560707
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
f560707
7f7aabc
* Wed Nov 11 2015 Eric Harney <eharney@redhat.com> - 1.4.7-1
7f7aabc
- Update to 1.4.7
7f7aabc
Matej Stuchlik 26c08b5
* Wed Nov 04 2015 Matej Stuchlik <mstuchli@redhat.com> - 1.4.6-3
Matej Stuchlik 26c08b5
- Rebuilt for Python 3.5
Matej Stuchlik 26c08b5
2f4fca4
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-2
2f4fca4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2f4fca4
4ca133a
* Mon Oct 06 2014 Eric Harney <eharney@redhat.com> - 1.4.6-1
4ca133a
- Update to 1.4.6
4ca133a
0e9f03c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-3
0e9f03c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0e9f03c
945253e
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.4.5-2
945253e
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
945253e
bb46879
* Wed Apr 16 2014 Eric Harney <eharney@redhat.com> - 1.4.5-1
bb46879
- Update to 1.4.5
bb46879
2ac4fc8
* Fri Feb 07 2014 Eric Harney <eharney@redhat.com> - 1.4.2-1
2ac4fc8
- Update to 1.4.2
2ac4fc8
14892d9
* Fri Jan 17 2014 Eric Harney <eharney@redhat.com> - 1.4.1-1
14892d9
- Update to 1.4.1
14892d9
9395792
* Fri Nov 15 2013 Eric Harney <eharney@redhat.com> - 1.3.3-1
9395792
- Update to 1.3.3
9395792
91739d0
* Fri Oct 25 2013 Eric Harney <eharney@redhat.com> - 1.3.1-1
91739d0
- Update to 1.3.1
91739d0
Eric Harney a9d77e4
* Tue Oct 08 2013 Eric Harney <eharney@redhat.com> - 1.3.0-1
Eric Harney a9d77e4
- Update to 1.3.0
Eric Harney a9d77e4
0ab611d
* Fri Sep 20 2013 Eric Harney <eharney@redhat.com> - 1.2.1-1
0ab611d
- Update to 1.2.1
0ab611d
56dcbdf
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.11-2
56dcbdf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
56dcbdf
41c37ab
* Fri Jun 21 2013 Eric Harney <eharney@redhat.com> - 1.0.11-1
41c37ab
- Initial package