%bcond_without python3 # RHEL 7 does not have requirements for tests %bcond_with tests # These Sphinx docs do not build without sphinx_celery packaged %bcond_with sphinx_docs %global srcname amqp Name: python-%{srcname} Version: 2.4.2 Release: 1%{?dist} Summary: Low-level AMQP client for Python (fork of amqplib) Group: Development/Languages License: BSD URL: http://pypi.python.org/pypi/amqp Source0: https://files.pythonhosted.org/packages/source/a/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch %if %{with sphinx_docs} BuildRequires: python-sphinx >= 0.8 %endif %description Low-level AMQP client for Python This is a fork of amqplib, maintained by the Celery project. This library should be API compatible with librabbitmq. %package -n python2-%{srcname} Summary: Client library for AMQP Requires: python2-vine >= 1.1.3 BuildRequires: python2-devel BuildRequires: python2-setuptools %if %{with tests} BuildRequires: python2-nose BuildRequires: python2-case BuildRequires: python2-pytest BuildRequires: python2-mock BuildRequires: python2-vine %endif %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} Low-level AMQP client for Python This is a fork of amqplib, maintained by the Celery project. This library should be API compatible with librabbitmq. %if %{with python3} %package -n python3-%{srcname} Summary: Client library for AMQP BuildRequires: python3-devel BuildRequires: python3-setuptools %if %{with tests} BuildRequires: python3-nose BuildRequires: python3-case BuildRequires: python3-pytest BuildRequires: python3-mock BuildRequires: python3-vine %endif %if %{with sphinx_docs} BuildRequires: python3-sphinx >= 0.8 %endif %{?python_provide:%python_provide python3-%{srcname}} Requires: python3-vine >= 1.1.3 %description -n python3-%{srcname} Low-level AMQP client for Python This is a fork of amqplib, maintained by the Celery project. This library should be API compatible with librabbitmq. %endif %package doc Summary: Documentation for python-amqp Group: Documentation Requires: %{name} = %{version}-%{release} %description doc Documentation for python-amqp %prep %autosetup -n %{srcname}-%{version} %build %py2_build %if %{with python3} %py3_build %endif %install %py2_install %if %{with python3} %py3_install %endif %if %{with sphinx_docs} # docs generation requires everything to be installed first export PYTHONPATH="$( pwd ):$PYTHONPATH" pushd docs # Disable extensions to prevent intersphinx from accessing net during build. # Other extensions listed are not used. sed -i s/^extensions/disable_extensions/ conf.py SPHINX_DEBUG=1 sphinx-build -b html . build/html rm -rf build/html/.doctrees build/html/.buildinfo popd %endif %check %if %{with tests} # Skip test_transport because the "patching" fixture # is not loading currently for python2. py.test-2 t/unit -k "not test_transport" %if %{with python3} py.test-3 t/unit %endif %endif %files -n python2-%{srcname} %doc Changelog README.rst %license LICENSE %{python2_sitelib}/%{srcname} %{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info %if %{with python3} %files -n python3-%{srcname} %doc Changelog README.rst %license LICENSE %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info %endif %files doc %license LICENSE %if %{with sphinx_docs} %doc docs/build/html docs/reference %endif %changelog * Sat Oct 03 2020 Frantisek Zatloukal - 2.4.2-1 - Update to 2.4.2 - Enable Python 3 on RHEL 7 * Sat Jan 26 2019 Neal Gompa - 2.4.0-1 - Rebase to 2.4.0 - Fix license tag to match actual source license - Use bconds for controlling build behavior - Make compatible with EPEL7 * Mon Dec 18 2017 Eric Harney - 1.4.9-1 - Update to 1.4.9 * Mon Oct 06 2014 Eric Harney - 1.4.6-1 - Update to 1.4.6 * Sat Jun 07 2014 Fedora Release Engineering - 1.4.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 14 2014 Bohuslav Kabrda - 1.4.5-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Wed Apr 16 2014 Eric Harney - 1.4.5-1 - Update to 1.4.5 * Fri Feb 07 2014 Eric Harney - 1.4.2-1 - Update to 1.4.2 * Fri Jan 17 2014 Eric Harney - 1.4.1-1 - Update to 1.4.1 * Fri Nov 15 2013 Eric Harney - 1.3.3-1 - Update to 1.3.3 * Fri Oct 25 2013 Eric Harney - 1.3.1-1 - Update to 1.3.1 * Tue Oct 08 2013 Eric Harney - 1.3.0-1 - Update to 1.3.0 * Fri Sep 20 2013 Eric Harney - 1.2.1-1 - Update to 1.2.1 * Fri Sep 20 2013 Eric Harney - 1.0.13-1 - Update to 1.0.13 * Sun Aug 04 2013 Fedora Release Engineering - 1.0.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Jun 21 2013 Eric Harney - 1.0.11-1 - Initial package