%if 0%{?fedora}
# we turn off python3 support until we can get python3-twisted-core in Fedora
%global with_python3 0
%endif
%global modname moksha.hub
Name: python-moksha-hub
Version: 1.5.2
Release: 1%{?dist}
Summary: Hub components for Moksha
License: ASL 2.0
URL: https://pypi.io/project/moksha.hub
Source0: https://pypi.io/packages/source/m/%{modname}/%{modname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-nose
BuildRequires: python-mock
BuildRequires: python-moksha-common >= 1.0.6
BuildRequires: python-twisted-core
BuildRequires: python-stomper
BuildRequires: python-txzmq
BuildRequires: python-txws
BuildRequires: python-daemon
BuildRequires: python-six
%if 0%{?fedora}
BuildRequires: python-websocket-client
%endif
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python3-moksha-common >= 1.0.6
BuildRequires: python3-twisted-core
BuildRequires: python3-txzmq
BuildRequires: python3-txws
BuildRequires: python3-six
#BuildRequires: python3-stomper
#BuildRequires: python3-daemon
BuildRequires: python3-websocket-client
%endif
Requires: python-moksha-common >= 1.0.6
Requires: python-twisted-core
Requires: python-stomper
Requires: python-txzmq
Requires: python-txws
Requires: python-daemon
Requires: python-six
# When installed, these enable new plugins for the moksha.hub
#BuildRequires: python-qpid
#Requires: python-qpid
# Its a whole different package now.
Conflicts: moksha < 1.0.0
%description
Hub components for Moksha.
%if 0%{?with_python3}
%package -n python3-moksha-hub
Summary: Hub components for Moksha
Requires: python3-moksha-common >= 1.0.6
Requires: python3-twisted-core
Requires: python3-txzmq
Requires: python3-txws
Requires: python3-six
%description -n python3-moksha-hub
Hub components for Moksha.
%endif
%prep
%setup -q -n %{modname}-%{version}
# Removed twisted from the list of deps in setup.py.
%{__sed} -i 's/"Twisted",//' setup.py
# *Experimental* support for python-zmq-13.0.0 in rawhide.
%{__sed} -i 's/pyzmq<=2.2.0.1/pyzmq/' setup.py
%build
CFLAGS="%{optflags}" %{__python2} setup.py build
%if 0%{?with_python3}
pushd %{py3dir}
CFLAGS="%{optflags}" %{__python3} setup.py build
popd
%endif
%install
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
mv %{buildroot}/%{_bindir}/moksha-hub %{buildroot}/%{_bindir}/moksha-hub-3
popd
%endif
%check
%if 0%{?rhel}
# Test suite requires a more modern Twisted than is in el6, so don't run it for
# now.
# Furthermore, the test suite requires python-websocket-client, which is in a
# rhel7-optional and isn't showing up in the fedoraproject koji buildroot.
# https://bugzilla.redhat.com/show_bug.cgi?id=1185049
%else
%{__python2} setup.py test
%endif
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif
%files
%doc README COPYING AUTHORS
%{python2_sitelib}/moksha/hub/
%{python2_sitelib}/%{modname}-%{version}*
%{_bindir}/moksha-hub
%if 0%{?with_python3}
%files -n python3-moksha-hub
%doc README COPYING AUTHORS
%{python3_sitelib}/moksha/hub/
%{python3_sitelib}/%{modname}-%{version}*
%{_bindir}/moksha-hub-3
%endif
%changelog
* Mon Jun 26 2017 Ralph Bean <rbean@redhat.com> - 1.5.2-1
- new version
* Fri Jun 09 2017 Ralph Bean <rbean@redhat.com> - 1.5.1-1
- new version
* Fri Jun 09 2017 Ralph Bean <rbean@redhat.com> - 1.5.0-1
- new version
* Wed May 31 2017 Ralph Bean <rbean@redhat.com> - 1.4.9-1
- new version
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Nov 10 2016 Ralph Bean <rbean@redhat.com> - 1.4.8-1
- new version
* Thu Oct 13 2016 Ralph Bean <rbean@redhat.com> - 1.4.7-1
- new version
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.6-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Jul 27 2015 Ralph Bean <rbean@redhat.com> - 1.4.6-1
- new version
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri May 08 2015 Ralph Bean <rbean@redhat.com> - 1.4.5-1
- Latest upstream. Fixes exception counting stats.
* Wed Oct 22 2014 Ralph Bean <rbean@redhat.com> - 1.4.4-1
- Latest upstream; removed our patches.
- Consumers can now handle a list of multiple topics again.
* Wed Oct 01 2014 Ralph Bean <rbean@redhat.com> - 1.4.3-2
- Patch to make polling producers advertise the last time they ran.
* Thu Sep 25 2014 Ralph Bean <rbean@redhat.com> - 1.4.3-1
- Latest upstream with stomp improvements.
* Mon Sep 15 2014 Ralph Bean <rbean@redhat.com> - 1.4.2-1
- Latest upstream with support for STOMP-1.1.
* Fri Aug 08 2014 Ralph Bean <rbean@redhat.com> - 1.4.1-1
- Configurable permissions on the monitoring socket.
- Suggest a threadpool size to twisted based on the number of consumers.
* Fri Jul 18 2014 Ralph Bean <rbean@redhat.com> - 1.4.0-1
- New API points: pre_consume and post_consume.
* Mon Jun 30 2014 Ralph Bean <rbean@redhat.com> - 1.3.4-1
- Improved exception handling in the consumer API.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Jun 03 2014 Ralph Bean <rbean@redhat.com> - 1.3.3-1
- Added threading model to the polling producer API.
* Thu Apr 24 2014 Ralph Bean <rbean@redhat.com> - 1.3.2-1
- Bugfixes to the monitoring socket.
* Thu Apr 24 2014 Ralph Bean <rbean@redhat.com> - 1.3.1-2
- Add dep on python-six.
* Thu Apr 24 2014 Ralph Bean <rbean@redhat.com> - 1.3.1-1
- More stats written to the monitoring socket.
* Sun Apr 13 2014 Ralph Bean <rbean@redhat.com> - 1.3.0-1
- Introduce a new monitoring socket.
- Moksha consumers are now given their own thread and incoming queue.
* Tue Jan 14 2014 Ralph Bean <rbean@redhat.com> - 1.2.2-2
- Enable websocket portion of the test suite again.
- Remove hard dep on python-qpid.
* Fri Dec 13 2013 Ralph Bean <rbean@redhat.com> - 1.2.2-1
- Latest upstream fixing a memory leak in the websocket server.
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Apr 15 2013 Ralph Bean <rbean@redhat.com> - 1.2.1-1
- Latest upstream with a bugfix to consumer loading.
* Tue Mar 26 2013 Ralph Bean <rbean@redhat.com> - 1.2.0-1
- Latest upstream.
- Removed websocket tests until this review is complete:
https://bugzilla.redhat.com/show_bug.cgi?id=909644
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Dec 04 2012 Ralph Bean <rbean@redhat.com> - 1.1.0-1
- Latest upstream with support for zmq_tcp_keepalive.
* Tue Dec 04 2012 Ralph Bean <rbean@redhat.com> - 1.0.9-1
- Latest upstream.
- Fixed check conditional for rhel6.
* Wed Oct 10 2012 Ralph Bean <rbean@redhat.com> - 1.0.7-1
- Various bugfixes.
- Support for zeromq3.
- Needs python-moksha-common-1.0.6 or later.
* Mon Oct 01 2012 Ralph Bean <rbean@redhat.com> - 1.0.4-1
- Allow moksha-hub to use a non-standard config (specified as an argument).
- Temporary bug fix in websocket server message distribution.
* Wed Sep 26 2012 Ralph Bean <rbean@redhat.com> - 1.0.3-1
- Fix to _initialized namespacing for consumers.
- More careful still when cleaning up consumers.
* Wed Sep 19 2012 Ralph Bean <rbean@redhat.com> - 1.0.2-1
- Miscellaneous bugfixes in consumer cleanup.
- Added conflicts tag against old moksha.
* Wed Sep 12 2012 Ralph Bean <rbean@redhat.com> - 1.0.1-1
- Require latest python-moksha-common
* Sat Sep 08 2012 Ralph Bean <rbean@redhat.com> - 1.0.0-5
- Disable test suite for el6.
* Sat Sep 08 2012 Ralph Bean <rbean@redhat.com> - 1.0.0-4
- Remove "Twisted" from the list of deps in setup.py.
* Wed Sep 05 2012 Ralph Bean <rbean@redhat.com> - 1.0.0-3
- Use optflags instead of RPM_OPT_FLAGS to be consistent.
* Wed Sep 05 2012 Ralph Bean <rbean@redhat.com> - 1.0.0-2
- Added RPM_OPT_FLAGS to the build section.
* Tue Sep 04 2012 Ralph Bean <rbean@redhat.com> - 1.0.0-1
- Initial package for Fedora and fork from moksha core.