Merge "Issue #2279 - updated python qpid library" into omaha_13.5.2
Former-commit-id:97517f0108
[formerly7ce8d46784
[formerly 423c06087708989914ee57eaea17e538ad5e4d17]] Former-commit-id:7ce8d46784
Former-commit-id:dc76e6acfd
This commit is contained in:
commit
2bd26e963c
5 changed files with 26 additions and 35 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
fdfb946cb0e7f986e186f169f458331de255fde9
|
BIN
pythonPackages/qpid/qpid-python-0.18.tar.gz
Normal file
BIN
pythonPackages/qpid/qpid-python-0.18.tar.gz
Normal file
Binary file not shown.
|
@ -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/*
|
||||
|
|
Loading…
Add table
Reference in a new issue