You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/01/25 20:32:50 UTC
svn commit: r1235880 - in /incubator/mesos/trunk/src/examples/python:
test-executor.in test-framework.in
Author: benh
Date: Wed Jan 25 19:32:50 2012
New Revision: 1235880
URL: http://svn.apache.org/viewvc?rev=1235880&view=rev
Log:
Added the distribute/setuptools egg to the PYTHONPATH of the Python example shell scripts, see MESOS-130 (contributed by Charles Reiss).
Modified:
incubator/mesos/trunk/src/examples/python/test-executor.in
incubator/mesos/trunk/src/examples/python/test-framework.in
Modified: incubator/mesos/trunk/src/examples/python/test-executor.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/examples/python/test-executor.in?rev=1235880&r1=1235879&r2=1235880&view=diff
==============================================================================
--- incubator/mesos/trunk/src/examples/python/test-executor.in (original)
+++ incubator/mesos/trunk/src/examples/python/test-executor.in Wed Jan 25 19:32:50 2012
@@ -14,14 +14,20 @@ test ! -z "${PYTHON}" && \
PYTHON=@PYTHON@
+DISTRIBUTE_EGG=`echo ${MESOS_BUILD_DIR}/third_party/distribute-*/*.egg`
+
+test ! -e ${DISTRIBUTE_EGG} && \
+ echo "${RED}Failed to find ${DISTRIBUTE_EGG}${NORMAL}" && \
+ exit 1
+
PROTOBUF=${MESOS_BUILD_DIR}/third_party/protobuf-2.3.0
-PROTOBUF_EGG=`ls ${PROTOBUF}/python/dist/protobuf*.egg`
+PROTOBUF_EGG=`echo ${PROTOBUF}/python/dist/protobuf*.egg`
test ! -e ${PROTOBUF_EGG} && \
echo "${RED}Failed to find ${PROTOBUF_EGG}${NORMAL}" && \
exit 1
-MESOS_EGG=`ls ${MESOS_BUILD_DIR}/src/python/dist/mesos*.egg`
+MESOS_EGG=`echo ${MESOS_BUILD_DIR}/src/python/dist/mesos*.egg`
test ! -e ${MESOS_EGG} && \
echo "${RED}Failed to find ${MESOS_EGG}${NORMAL}" && \
@@ -33,4 +39,5 @@ test ! -e ${SCRIPT} && \
echo "${RED}Failed to find ${SCRIPT}${NORMAL}" && \
exit 1
-PYTHONPATH=${MESOS_EGG}:${PROTOBUF_EGG} exec ${PYTHON} ${SCRIPT} "${@}"
+PYTHONPATH="${DISTRIBUTE_EGG}:${MESOS_EGG}:${PROTOBUF_EGG}" \
+ exec ${PYTHON} ${SCRIPT} "${@}"
Modified: incubator/mesos/trunk/src/examples/python/test-framework.in
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/examples/python/test-framework.in?rev=1235880&r1=1235879&r2=1235880&view=diff
==============================================================================
--- incubator/mesos/trunk/src/examples/python/test-framework.in (original)
+++ incubator/mesos/trunk/src/examples/python/test-framework.in Wed Jan 25 19:32:50 2012
@@ -14,14 +14,20 @@ test ! -z "${PYTHON}" && \
PYTHON=@PYTHON@
+DISTRIBUTE_EGG=`echo ${MESOS_BUILD_DIR}/third_party/distribute-*/*.egg`
+
+test ! -e ${DISTRIBUTE_EGG} && \
+ echo "${RED}Failed to find ${DISTRIBUTE_EGG}${NORMAL}" && \
+ exit 1
+
PROTOBUF=${MESOS_BUILD_DIR}/third_party/protobuf-2.3.0
-PROTOBUF_EGG=`ls ${PROTOBUF}/python/dist/protobuf*.egg`
+PROTOBUF_EGG=`echo ${PROTOBUF}/python/dist/protobuf*.egg`
test ! -e ${PROTOBUF_EGG} && \
echo "${RED}Failed to find ${PROTOBUF_EGG}${NORMAL}" && \
exit 1
-MESOS_EGG=`ls ${MESOS_BUILD_DIR}/src/python/dist/mesos*.egg`
+MESOS_EGG=`echo ${MESOS_BUILD_DIR}/src/python/dist/mesos*.egg`
test ! -e ${MESOS_EGG} && \
echo "${RED}Failed to find ${MESOS_EGG}${NORMAL}" && \
@@ -37,4 +43,5 @@ test ! -e ${SCRIPT} && \
# framework is able to find the executor.
cd `dirname ${0}`
-PYTHONPATH=${MESOS_EGG}:${PROTOBUF_EGG} exec ${PYTHON} ${SCRIPT} "${@}"
+PYTHONPATH="${DISTRIBUTE_EGG}:${MESOS_EGG}:${PROTOBUF_EGG}" \
+ exec ${PYTHON} ${SCRIPT} "${@}"