%if 0%{?fedora} || 0%{?rhel} > 7 %global with_python3 1 %else %global with_python3 0 %endif %global srcname rhmsg %global project_url https://gitlab.cee.redhat.com/exd-guild-messaging/%{srcname} Summary: A Python module interacting with ActiveMQ Name: python-%{srcname} Version: 0.12.0 Release: 2%{?dist} Source0: %{project_url}/-/archive/%{version}/%{srcname}-%{version}.tar.gz License: GPLv3 Group: Development/Libraries Url: %{project_url} BuildArch: noarch %description A Python module interacting with ActiveMQ %if 0%{?with_python3} %package -n python3-%{srcname} Summary: A Python module interacting with ActiveMQ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-mock BuildRequires: python3-pytest BuildRequires: python3-qpid-proton >= 0.13.0 BuildRequires: python3-requests BuildRequires: python3-six Requires: python3-qpid-proton >= 0.13.0 Requires: python3-setuptools %description -n python3-%{srcname} A Python 3 module interacting with ActiveMQ %else %package -n python2-%{srcname} Summary: A Python module interacting with ActiveMQ BuildRequires: python-setuptools BuildRequires: python-devel BuildRequires: python-mock BuildRequires: python-pytest BuildRequires: python-six BuildRequires: python-qpid-proton >= 0.13.0 BuildRequires: python-requests Requires: python-qpid-proton >= 0.13.0 Requires: python-setuptools Provides: python-%{srcname} Obsoletes: %{name} <= 0.5 %description -n python2-%{srcname} A Python 2 module interacting with ActiveMQ %endif %package -n %{srcname}-cli Summary: rhmsg command line utitlies to interact with Unified Message Bus %if 0%{?with_python3} Requires: python3-requests Requires: python3-%{srcname} = %{version}-%{release} %else Requires: python2-requests Requires: python2-%{srcname} = %{version}-%{release} %endif %description -n %{srcname}-cli rhmsg command line utitlies to interact with Unified Message Bus %prep %autosetup -n %{srcname}-%{version} %build %if 0%{?with_python3} %py3_build %else %py2_build %endif %check %if 0%{?with_python3} PYTHONPATH=. py.test-3 %else PYTHONPATH=. py.test %endif %install %if 0%{?with_python3} %py3_install %else %py2_install %endif %clean %if 0%{?with_python3} %files -n python3-%{srcname} %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-%{version}-*.egg-info %else %files -n python2-%{srcname} %{python_sitelib}/%{srcname}/ %{python_sitelib}/%{srcname}-%{version}-*.egg-info %endif %doc README.rst AUTHORS.rst CHANGELOG.rst doc/ %files -n %{srcname}-cli %{_bindir}/amq-consumer %{_bindir}/amq-producer %{_bindir}/rhmsg-replay %changelog * Fri Apr 09 2021 Chenxiong Qi - 0.12.0-2 - Add missing release in cli requires * Wed Apr 07 2021 Chenxiong Qi - 0.12.0-1 - 0.12.0 Release * Wed Nov 11 2020 Chenxiong Qi - 0.11.0-1 - Deprecate argument -d and --debug (Chenxiong Qi) - Update dev brokers (Chenxiong Qi) * Thu Apr 02 2020 Chenxiong Qi - 0.10.1-2 - Own rhmsg/ by lib * Mon Nov 25 2019 Chenxiong Qi - 0.10-1 - Install rhmsg with dependent packages together (Chenxiong Qi) - Address review comments to command line options help (Chenxiong Qi) - Let git ignore more files (Chenxiong Qi) - Clean logger names (Chenxiong Qi) - Resend all messages listed in a message file (Chenxiong Qi) - Update command line options help (Chenxiong Qi) - Migrate to argparse (Chenxiong Qi) - Update docstring of ReceiverHandler (Chenxiong Qi) - Use newer Fedora dist for CI (Chenxiong Qi) * Wed Jan 02 2019 Chenxiong Qi - 0.9-1 - SSLDomain moved to proton namespace (Chenxiong Qi) - Ignore these files, produced by tox. (Ralph Bean) - Work with Python 3.7 (Chenxiong Qi) * Thu Dec 20 2018 Chenxiong Qi - 0.8-5 - Backport: 0001-SSLDomain-moved-to-proton-namespace.patch * Wed Nov 07 2018 Ondřej Nosek - 0.8-5 - Rebuilt to provide Python 2 package for Fedora<=29 * Thu Aug 09 2018 Chenxiong Qi - 0.8-4 - Require python-requests in rhel<=7 * Tue Aug 07 2018 Chenxiong Qi - 0.8-3 - Rebuilt to provide Python 3 package for Fedora<=28 * Mon Jul 30 2018 Chenxiong Qi - 0.8-2 - Refactor to build Python 3 package in Fedora and RHEL8 * Tue Apr 03 2018 Chenxiong Qi - 0.8-1 - enable creation of durable subscriptions (Mike Bonnet) - Allow equality sign in property value in amq-producer (Chenxiong Qi) - run tests on Fedora 27 also (Mike Bonnet) - run tests on all available interpreters in Fedora (Mike Bonnet) - Make doc of argument body more concrete in AMQProducer.send_msg (Chenxiong Qi) - remove deprecated usage of Exception.message (Mike Bonnet) - also run tests on Fedora 26 (Mike Bonnet) - fix some refactoring errors, py3 incompatibilities, and flake8 errors (Mike Bonnet) - fix tests to account for differences between python 2 and 3 (Mike Bonnet) - fix intermittent unit test error caused by undefined ordering of entries in a dict (Mike Bonnet) - send_msg() and send_msgs(): allow passing keyword arguments, which will be set as attributes on the underlying Message (Mike Bonnet) - simplify Jenkinsfile (Mike Bonnet) - Ignore htmlcov directory (Chenxiong Qi) - Add LICENSE file (Chenxiong Qi) - Move broker envs into separate module (Chenxiong Qi) - add address to the message dump (Mike Bonnet) - enable Cobertura reporting (Mike Bonnet) - README: describe cert files and example invocation (Ken Dreyer) - A Jenkinsfile for use with the rcm-tools-jenkins Jenkins master. (Mike Bonnet) * Fri Feb 02 2018 Mike Bonnet - 0.7-3 - Allow setting attributes on the underlying message in send_msg() and send_msgs() * Thu Nov 09 2017 Chenxiong Qi - 0.7-2 - Obsoletes 0.5 and older versions * Wed Oct 18 2017 Chenxiong Qi - 0.7-1 - Fix a pep8 error (cqi) - Allow to accept message manually - COMPOSE-1782 (cqi) - Show test coverage (cqi) - Run tests in various Python versions (cqi) - Update doc make-release.rst (cqi) * Fri Aug 4 2017 Chenxiong Qi - 0.6-1 - Package: split cli to separate package - Package: rename main package name to python2-rhmsg and python-rhmsg is still provided - Able to read messages from a file (Chenxiong Qi) - pretty-print received messages (Chenxiong Qi) - Add requirements files (Chenxiong Qi) - Add new CLI rhmsg-replay (Chenxiong Qi) - Delete unuseful example scripts (Chenxiong Qi) - fix tests to actually check the exception message (Mike Bonnet) - improve error reporting in AMQProducer (Mike Bonnet) * Fri May 19 2017 Mike Bonnet - 0.5-2 - include error messages in exception text when messages could not be sent * Tue Mar 21 2017 Mike Bonnet - 0.5-1 - enable peer authentication in the consumer - replace inconsistent --host/--url option with --env in the cli tools - handle unicode message bodies - rename the --it-cert option to --ca-certs in the cli tools - fix problems with the default on_transport_error handler * Fri Dec 02 2016 Mike Bonnet - 0.4-3 - fix problems with the default on_transport_error handler * Tue Nov 15 2016 Mike Bonnet - 0.4-2 - call set_peer_authentication() after set_trusted_ca_db() * Fri Nov 04 2016 Chenxiong Qi - 0.4-1 - add failover support to AMQProducer (Mike Bonnet) * Fri Sep 30 2016 Chenxiong Qi - 0.3-1 - pass properties to the proton.Message class properly (Mike Bonnet) - Ignore .cache directory (Chenxiong Qi) * Tue Sep 20 2016 Chenxiong Qi - 0.2-1 - allow specifying a timeout in the AMQProducer constructor (Mike Bonnet) - send_msg(): send a single message (Mike Bonnet) - allow specifying queue or topic in the AMQProducer constructor (Mike Bonnet) - minor spelling fix (Mike Bonnet) - initialize all attributes of AMQProducer in __init__() (Mike Bonnet) - test cases for AMQProducer (Mike Bonnet) - Fix incorrect module name in example (Chenxiong Qi) * Thu Aug 25 2016 Chenxiong Qi - 0.1-1 - Initial package