cb65bcb
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
38c1ef2
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
cb65bcb
%endif
cb65bcb
d598bf3
%if 0%{?fedora}
cb65bcb
%global with_python3 1
cb65bcb
%endif
38c1ef2
38c1ef2
Name:           stomppy
d598bf3
Version:        4.0.16
d598bf3
Release:        1%{?dist}
38c1ef2
Summary:        Python stomp client for messaging
38c1ef2
38c1ef2
Group:          Development/Libraries
38c1ef2
License:        ASL 2.0
311860f
URL:            https://github.com/kwoli/stomp.py
311860f
Source0:        https://pypi.python.org/packages/source/s/stomp.py/stomp.py-%{version}.tar.gz
38c1ef2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
38c1ef2
BuildArch:      noarch
38c1ef2
cb65bcb
BuildRequires:  python2-devel
cb65bcb
%if 0%{?with_python3}
cb65bcb
BuildRequires:  python3-devel
cb65bcb
%endif # if with_python3
38c1ef2
cb65bcb
# Needs python-ssl for python 2.3 and 2.4.
7dbe6b2
%if 0%{?el4}%{?el5}
7dbe6b2
Requires: python-ssl
7dbe6b2
%endif
7dbe6b2
7dbe6b2
38c1ef2
%description
38c1ef2
stomp.py is a Python client library for accessing messaging servers 
38c1ef2
(such as ActiveMQ or JBoss Messaging) using the STOMP protocol. It can also
38c1ef2
be run as a standalone, command-line client for testing.
38c1ef2
cb65bcb
%if 0%{?with_python3}
cb65bcb
%package -n python3-stomppy
cb65bcb
Summary:        Python stomp client for messaging for python3
cb65bcb
Group:          Development/Libraries
cb65bcb
cb65bcb
%description -n python3-stomppy
cb65bcb
stomp.py is a Python client library for accessing messaging servers 
cb65bcb
(such as ActiveMQ or JBoss Messaging) using the STOMP protocol. It can also
cb65bcb
be run as a standalone, command-line client for testing.
cb65bcb
cb65bcb
This module is for the python3.
cb65bcb
%endif
cb65bcb
38c1ef2
%prep
38c1ef2
%setup -q -n stomp.py-%{version}
cb65bcb
cb65bcb
%if 0%{?with_python3}
cb65bcb
rm -rf %{py3dir}
cb65bcb
cp -a . %{py3dir}
cb65bcb
%endif # with_python3
cb65bcb
38c1ef2
38c1ef2
%build
38c1ef2
%{__python} setup.py build
38c1ef2
cb65bcb
%if 0%{?with_python3}
cb65bcb
pushd %{py3dir}
cb65bcb
%{__python3} setup.py build
cb65bcb
popd
cb65bcb
%endif # with_python3
cb65bcb
cb65bcb
cb65bcb
38c1ef2
%install
38c1ef2
rm -rf $RPM_BUILD_ROOT
cb65bcb
%if 0%{?with_python3}
cb65bcb
pushd %{py3dir}
cb65bcb
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
cb65bcb
rm -rf %{buildroot}%{python3_sitelib}/test
cb65bcb
popd
cb65bcb
%endif # with_python3
cb65bcb
cb65bcb
38c1ef2
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
38c1ef2
rm -rf $RPM_BUILD_ROOT%{python_sitelib}/test
38c1ef2
38c1ef2
%clean
38c1ef2
rm -rf $RPM_BUILD_ROOT
38c1ef2
38c1ef2
%files
38c1ef2
%defattr(-,root,root,-)
38c1ef2
%{python_sitelib}/*
d598bf3
311860f
%doc LICENSE CHANGELOG stomp.log.conf
38c1ef2
cb65bcb
%if 0%{?with_python3}
cb65bcb
%files -n python3-stomppy
cb65bcb
%defattr(-,root,root,-)
cb65bcb
%{python3_sitelib}/*
d598bf3
%{_bindir}/stomp
311860f
%doc LICENSE CHANGELOG stomp.log.conf
cb65bcb
%endif # with_python3
cb65bcb
cb65bcb
38c1ef2
%changelog
d598bf3
* Thu Jun 4 2015 Steve Traylen <steve.traylen@cern.ch> - 4.0.16-1
d598bf3
- Update to 4.0.16
d598bf3
f3754fc
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.6-4
f3754fc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f3754fc
d002380
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 3.1.6-3
d002380
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
d002380
522b17a
* Thu Mar 27 2014 Lubomir Rintel <lkundrak@v3.sk> - 3.1.6-2
9412158
- No python3 on el7
9412158
311860f
* Wed Oct 9 2013 Steve Traylen <steve.traylen@cern.ch.com> - 3.1.6-1
311860f
- Update to 3.1.6, upstream moved to github.
311860f
5aa0593
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.5-5
5aa0593
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5aa0593
bec8736
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.5-4
bec8736
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
bec8736
33ab5e2
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 3.0.5-3
33ab5e2
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
33ab5e2
674c057
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.5-2
674c057
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
674c057
2a85fe9
* Mon Feb 13 2012 Steve Traylen <steve.traylen@cern.ch.com> - 3.0.5-1
2a85fe9
- Update to 3.0.5
2a85fe9
5f5bc7b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-3
5f5bc7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5f5bc7b
812edde
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-2
812edde
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
812edde
27b871d
* Sun Feb 6 2011 Steve Traylen <steve.traylen@cern.ch.com> - 3.0.3-1
27b871d
- Update to 3.0.3
27b871d
4fe46ea
* Tue Aug 24 2010 Steve Traylen <steve.traylen@cern.ch.com> - 3.0.2-0.1.a
4fe46ea
- Update to source to 3.0.2a, a pre-release of 3.0.2.
4fe46ea
30019d7
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 3.0.1-0.2.beta2.1
30019d7
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
30019d7
cb65bcb
* Fri May 14 2010 Steve Traylen <steve.traylen@cern.ch> -  3.0.1-0.2.beta2
cb65bcb
- Build with correct file this time.
cb65bcb
cb65bcb
* Thu May 13 2010 Steve Traylen <steve.traylen@cern.ch> -  3.0.1-0.1.beta2
764a2c6
- Update to 3.0.2beta2
764a2c6
- Add new CHANGELOG and README files.
cb65bcb
- Add python3 support.
cb65bcb
- Remove python-rm-bang-python.patch, no longer a file to patch even.
764a2c6
38c1ef2
* Wed Sep 30 2009 Steve Traylen <steve.traylen@cern.ch> -  2.0.4-1
38c1ef2
- Update to 2.0.4
38c1ef2
  remove patch to allow building with out network.
38c1ef2
38c1ef2
* Wed Sep 30 2009 Steve Traylen <steve.traylen@cern.ch> -  2.0.2-3
38c1ef2
- Remove some dos line feeds
38c1ef2
38c1ef2
* Tue Sep 29 2009 Steve Traylen <steve.traylen@cern.ch> -  2.0.2-2
38c1ef2
- Add patch to allow build without working network.
38c1ef2
38c1ef2
* Mon Sep 7 2009 Steve Traylen <steve.traylen@cern.ch> -  2.0.2-1
38c1ef2
- Initial version.
38c1ef2