Issue #2279 - updated python qpid library

- python qpid is no longer compiled; so, the rpm is now noarch


Former-commit-id: 818c69fb39 [formerly 8487a7abdc967f39f853919b5c274b354a674b2c]
Former-commit-id: f2dd3ab85a
This commit is contained in:
Bryan Kowal 2013-08-29 15:59:21 -05:00
parent e366726d06
commit 981562faac
5 changed files with 26 additions and 35 deletions

View file

@ -27,7 +27,6 @@ import socket
import re
import httplib
import json
from qmf.console import Session, Console
from qpid.disp import Display, Header, Sorter
_host = "localhost"
@ -55,7 +54,7 @@ def Usage ():
print
sys.exit (1)
class RestManager(Console):
class RestManager():
def __init__(self):
self._host = None
self._port = 0

View file

@ -29,7 +29,6 @@ import httplib
import json
import time
from datetime import datetime
from qmf.console import Session, Console
from qpid.disp import Display, Header, Sorter
_host = "localhost"
@ -64,7 +63,7 @@ def Usage ():
print
sys.exit (1)
class DisplayManager(Console):
class DisplayManager():
def displayBroker(self, jsonObjArray):
disp = Display(prefix=" ")
@ -230,7 +229,7 @@ class DisplayManager(Console):
elif main == 'e': self.displayExchange(jsonObject)
elif main == 'q': self.displayQueue(jsonObject)
class RestManager(Console):
class RestManager():
def __init__(self):
self._host = None
self._port = 0

View file

@ -1 +0,0 @@
fdfb946cb0e7f986e186f169f458331de255fde9

Binary file not shown.

View file

@ -7,8 +7,9 @@
#
Name: awips2-python-qpid
Summary: AWIPS II Python qpid Distribution
Version: 0.6
Release: 7
Version: 0.18
Release: 1
BuildArch: noarch
Group: AWIPSII
BuildRoot: %{_build_root}
BuildArch: %{_build_arch}
@ -40,12 +41,11 @@ mkdir -p %{_build_root}/build-python
%build
QPID_SRC_DIR="%{_python_pkgs_dir}/qpid"
QPID_TAR="qpid-0.6.tar.gz"
QPID_TAR="qpid-python-0.18.tar.gz"
cp -rv ${QPID_SRC_DIR}/${QPID_TAR} \
%{_build_root}/build-python
RC=$?
if [ ${RC} -ne 0 ]; then
if [ $? -ne 0 ]; then
exit 1
fi
@ -57,8 +57,7 @@ popd > /dev/null
%install
QPID_SRC_DIR="%{_python_pkgs_dir}/qpid"
QPID_SRC="qpid-0.6/python"
QPID_SPECS="qpid-0.6/specs"
QPID_SRC="qpid-0.18/python"
QPID_STAT_SCRIPT="qpid-stat"
QPID_QUEUE_COUNT_SCRIPT="qpid-queue-count"
QPID_MONITOR_SCRIPT="monitor_qpid_host.sh"
@ -66,11 +65,14 @@ QPID_MONITOR_SCRIPT="monitor_qpid_host.sh"
pushd . > /dev/null
cd %{_build_root}/build-python/${QPID_SRC}
mkdir -p %{_build_root}/awips2/python
export LD_LIBRARY_PATH=/awips2/python/lib
export PATH=/awips2/python/bin:${PATH}
make install PREFIX=%{_build_root}/awips2/python
RC=$?
if [ ${RC} -ne 0 ]; then
/awips2/python/bin/python setup.py build
if [ $? -ne 0 ]; then
exit 1
fi
/awips2/python/bin/python setup.py install \
--root=%{_build_root} \
--prefix=/awips2/python
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null
@ -78,35 +80,29 @@ popd > /dev/null
# Copy the stats script to bin
cp -v ${QPID_SRC_DIR}/bin/${QPID_STAT_SCRIPT} \
%{_build_root}/awips2/python/bin
if [ $? -ne 0 ]; then
exit 1
fi
# Copy the queue-counting script to bin
cp -v ${QPID_SRC_DIR}/bin/${QPID_QUEUE_COUNT_SCRIPT} \
%{_build_root}/awips2/python/bin
if [ $? -ne 0 ]; then
exit 1
fi
# Copy the monitoring script to bin
cp -v ${QPID_SRC_DIR}/bin/${QPID_MONITOR_SCRIPT} \
%{_build_root}/awips2/python/bin
# Copy the amqp dtd/xml data to share
mkdir -p %{_build_root}/awips2/python/share/amqp
cp -prv %{_build_root}/build-python/${QPID_SPECS}/* \
%{_build_root}/awips2/python/share/amqp
if [ $? -ne 0 ]; then
exit 1
fi
rm -rf %{_build_root}/build-python
%pre
%post
# get the path to the awips2-python that is installed
PYDIR="/awips2/python"
# get the python version so we can fix the amqp xml/dtd
PYTHON_VERSION=$( LD_LIBRARY_PATH=${PYDIR}/lib ${PYDIR}/bin/python -c "from distutils.sysconfig import get_python_version; print get_python_version()" )
# the file /awips2/python/lib/python$PYTHON_VERSION/site-packages/qpid_config.py is wrong
# this substitution will put the correct path in the file qpid_config.py
# otherwise it will generate AMQP errors when run, it won't find the directory
sed -i "s|^AMQP_SPEC_DIR=.*/share/amqp\"|AMQP_SPEC_DIR=\"${PYDIR}/share/amqp\"|g" \
${PYDIR}/lib/python${PYTHON_VERSION}/site-packages/qpid_config.py
%preun
@ -119,8 +115,6 @@ rm -rf ${RPM_BUILD_ROOT}
%defattr(644,awips,fxalpha,755)
%dir /awips2/python/lib/python2.7/site-packages
/awips2/python/lib/python2.7/site-packages/*
%dir /awips2/python/share
/awips2/python/share/*
%defattr(755,awips,fxalpha,755)
%dir /awips2/python/bin
/awips2/python/bin/*