Blob Blame History Raw
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif

%if 0%{?fedora}
%global with_python3 1
%endif

Name:           stomppy
Version:        4.1.11
Release:        2%{?dist}
Summary:        Python stomp client for messaging

Group:          Development/Libraries
License:        ASL 2.0
URL:            https://github.com/kwoli/stomp.py
Source0:        https://pypi.python.org/packages/source/s/stomp.py/stomp.py-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  python2-devel
%if 0%{?with_python3}
BuildRequires:  python3-devel
%endif # if with_python3

# Needs python-ssl for python 2.3 and 2.4.
%if 0%{?el4}%{?el5}
Requires: python-ssl
%endif


%description
stomp.py is a Python client library for accessing messaging servers 
(such as ActiveMQ or JBoss Messaging) using the STOMP protocol. It can also
be run as a standalone, command-line client for testing.

%if 0%{?with_python3}
%package -n python3-stomppy
Summary:        Python stomp client for messaging for python3
Group:          Development/Libraries

%description -n python3-stomppy
stomp.py is a Python client library for accessing messaging servers 
(such as ActiveMQ or JBoss Messaging) using the STOMP protocol. It can also
be run as a standalone, command-line client for testing.

This module is for the python3.
%endif

%prep
%setup -q -n stomp.py-%{version}

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3


%build
%{__python} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3



%install
rm -rf $RPM_BUILD_ROOT
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
rm -rf %{buildroot}%{python3_sitelib}/test
# backwardsosck25.py file is not used with python3 but also fails to bytecompile
# so we just trash it.
rm %{buildroot}%{python3_sitelib}/stomp/backwardsock25.py
popd
%endif # with_python3


%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT%{python_sitelib}/test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{python_sitelib}/*

%doc LICENSE CHANGELOG stomp.log.conf

%if 0%{?with_python3}
%files -n python3-stomppy
%defattr(-,root,root,-)
%{python3_sitelib}/*
%{_bindir}/stomp
%doc LICENSE CHANGELOG stomp.log.conf
%endif # with_python3


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

* Tue May 24 2016 Steve Traylen <steve.traylen@cern.ch> - 4.1.11-1
- Update to 4.1.11

* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Tue Nov 3 2015 Steve Traylen <steve.traylen@cern.ch> - 4.1.8-1
- Update to 4.1.8
- Delete incompatible and unused file backwardsock25.py on python3.

* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu Jun 4 2015 Steve Traylen <steve.traylen@cern.ch> - 4.0.16-1
- Update to 4.0.16

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 3.1.6-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Thu Mar 27 2014 Lubomir Rintel <lkundrak@v3.sk> - 3.1.6-2
- No python3 on el7

* Wed Oct 9 2013 Steve Traylen <steve.traylen@cern.ch.com> - 3.1.6-1
- Update to 3.1.6, upstream moved to github.

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 3.0.5-3
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Mon Feb 13 2012 Steve Traylen <steve.traylen@cern.ch.com> - 3.0.5-1
- Update to 3.0.5

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Feb 6 2011 Steve Traylen <steve.traylen@cern.ch.com> - 3.0.3-1
- Update to 3.0.3

* Tue Aug 24 2010 Steve Traylen <steve.traylen@cern.ch.com> - 3.0.2-0.1.a
- Update to source to 3.0.2a, a pre-release of 3.0.2.

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.0.1-0.2.beta2.1
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Fri May 14 2010 Steve Traylen <steve.traylen@cern.ch> -  3.0.1-0.2.beta2
- Build with correct file this time.

* Thu May 13 2010 Steve Traylen <steve.traylen@cern.ch> -  3.0.1-0.1.beta2
- Update to 3.0.2beta2
- Add new CHANGELOG and README files.
- Add python3 support.
- Remove python-rm-bang-python.patch, no longer a file to patch even.

* Wed Sep 30 2009 Steve Traylen <steve.traylen@cern.ch> -  2.0.4-1
- Update to 2.0.4
  remove patch to allow building with out network.

* Wed Sep 30 2009 Steve Traylen <steve.traylen@cern.ch> -  2.0.2-3
- Remove some dos line feeds

* Tue Sep 29 2009 Steve Traylen <steve.traylen@cern.ch> -  2.0.2-2
- Add patch to allow build without working network.

* Mon Sep 7 2009 Steve Traylen <steve.traylen@cern.ch> -  2.0.2-1
- Initial version.