%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%global beta 2
Name: stomppy
Version: 3.0.1
Release: %{?beta:0.}1%{?beta:.beta%{beta}}%{?dist}
Summary: Python stomp client for messaging
Group: Development/Libraries
License: ASL 2.0
URL: http://code.google.com/p/stomppy/
Source0: http://stomppy.googlecode.com/files/stomp.py-%{version}%{?beta:-beta%{beta}}.tar.gz
Patch1: %{name}-rm-bang-python.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
%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.
%prep
%setup -q -n stomp.py-%{version}
#%patch1 -p1
# Remove dos line feeds from tests.
#%{__sed} -i 's/\r//' test/testlistener.py
#%{__sed} -i 's/\r//' test/rabbitmq.py
#%{__sed} -i 's/\r//' test/basic.py
%build
%{__python} setup.py build
%install
rm -rf $RPM_BUILD_ROOT
%{__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 README
%changelog
* Thu May 13 2010 Steve Traylen <steve.traylen@cern.ch> - 3.0.2-0.1.beta2
- Update to 3.0.2beta2
- Add new CHANGELOG and README files.
* 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.