Issue #2382 - fix qpid amqp path
Former-commit-id:b9f4e93687
[formerly 263ce6e82d1ecf3164961b599c2d4aac7d61f783] Former-commit-id:b002df8a06
This commit is contained in:
parent
8d936cbfc3
commit
8ce22ec91a
1 changed files with 13 additions and 5 deletions
|
@ -96,19 +96,27 @@ mkdir -p %{_build_root}/awips2/python/share/amqp
|
|||
cp -prv %{_python_build_loc}/${QPID_SPECS}/* \
|
||||
%{_build_root}/awips2/python/share/amqp
|
||||
|
||||
%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()" )
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 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
|
||||
sed -i "s|^AMQP_SPEC_DIR=.*/amqp\"|AMQP_SPEC_DIR=\"${PYDIR}/share/amqp\"|g" \
|
||||
%{_build_root}/${PYDIR}/lib/python${PYTHON_VERSION}/site-packages/qpid_config.py
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%pre
|
||||
|
||||
%post
|
||||
|
||||
%preun
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue