Blob Blame History Raw
%{!?_licensedir: %global license %%doc}

%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2:        %global __python2 /usr/bin/python2}
%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

%global modname gilmsg

Name:               gilmsg
Version:            0.1.2
Release:            9%{?dist}
Summary:            A reliability layer on top of fedmsg

License:            LGPLv2+
URL:                http://pypi.python.org/pypi/gilmsg
Source0:            https://pypi.python.org/packages/source/g/%{modname}/%{modname}-%{version}.tar.gz

BuildArch:          noarch

BuildRequires:      python2-devel
BuildRequires:      python2-setuptools
BuildRequires:      fedmsg

# We need the "pre_fire_hook" feature added in fedmsg-0.16.0
Requires:           fedmsg >= 0.16.0

%description
gilmsg layers a reliability check in-band on top of the existing PUB-SUB fedmsg
framework.

Here's how it works, broadly:

- When ``gilmsg.publish(...)`` is invoked, you must declare a list of required
  recipients.
- A background thread is started that listens for ACK messages on
  the whole bus.
- If an ACK is not received from all ``recipients`` within a given timeout,
  then a ``Timeout`` exception is raised.

%prep
%setup -q -n %{modname}-%{version}

# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build


%install
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}

# gilmsg does not have a test suite of its own
#%%check
#%%{__python2} setup.py test

%files
%doc README.rst
%license LICENSE
%{python2_sitelib}/gilmsg.py*
%{python2_sitelib}/%{modname}-%{version}*

%{_bindir}/gilmsg-logger

%changelog
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.1.2-7
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Sep 09 2015 Ralph Bean <rbean@redhat.com> - 0.1.2-1
- Initial package for Fedora