From 2fa3c02c3a6e72404bcc01a6565be911725fe924 Mon Sep 17 00:00:00 2001 From: mpaladin Date: Feb 21 2012 14:18:35 +0000 Subject: Initial import (#784603) --- diff --git a/.gitignore b/.gitignore index e69de29..0cecf77 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/messaging-0.5.tar.gz diff --git a/python-messaging.spec b/python-messaging.spec new file mode 100644 index 0000000..7085982 --- /dev/null +++ b/python-messaging.spec @@ -0,0 +1,127 @@ +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%global with_python3 1 +%endif +%if 0%{?rhel} == 5 +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} +%endif + +%global srcname messaging + +Name: python-messaging +Version: 0.5 +Release: 2%{?dist} +Summary: Python abstraction of a "message" + +Group: Development/Libraries +License: ASL 2.0 +URL: http://mpaladin.web.cern.ch/mpaladin/python/%{srcname}/ +Source0: http://pypi.python.org/packages/source/m/%{srcname}/%{srcname}-%{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 +# For python < 2.6 python-siplejson is required +%if 0%{?fedora} < 11 || 0%{?rhel} <= 6 +BuildRequires: python-simplejson +Requires: python-simplejson +%endif + +%description +This module provides an abstraction of a "message", as used in Enterprise +Messaging Systems. + +The modules include a transport independent message abstraction, a +versatile message generator and several message queues/spools to +locally store messages. + +The python module messaging is compatible with the Perl +module Messaging::Message. + +%if 0%{?with_python3} +%package -n python3-messaging +Summary: Python abstraction of a "message" +Group: Development/Libraries + +%description -n python3-messaging +This module provides an abstraction of a "message", as used in Enterprise +Messaging Systems. + +The modules include a transport independent message abstraction, a +versatile message generator and several message queues/spools to +locally store messages. + +The python module messaging is compatible with the Perl +module Messaging::Message. +%endif # with_python3 + +%prep +%setup -q -n %{srcname}-%{version} + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' +%endif # with_python3 + +find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|' + +%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 --skip-build --root $RPM_BUILD_ROOT +popd +%endif # with_python3 + +%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT + +%check +%{__python} setup.py test +# And remove compiled documentation. +rm -f test/*.pyc + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py test +rm -f test/*.pyc +popd +%endif # with_python3 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc LICENSE README CHANGES example test +%{python_sitelib}/%{srcname}/ +%if 0%{?rhel} != 5 +%{python_sitelib}/%{srcname}-%{version}-py?.?.egg-info +%endif + +%if 0%{?with_python3} +%files -n python3-messaging +%doc LICENSE README CHANGES example test +%{python3_sitelib}/%{srcname}/ +%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info +%endif # with_python3 + +%changelog +* Mon Feb 20 2012 Massimo Paladin - 0.5-2 +- Making it compliant with guidelines. + +* Mon Jan 23 2012 Massimo Paladin - 0.5-1 +- Initial packaging. + diff --git a/sources b/sources index e69de29..3e5385f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +0b41ba68ef9951c862c73bdcc0917694 messaging-0.5.tar.gz