You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ts...@apache.org on 2014/08/14 16:47:31 UTC
git commit: MESOS-1169: unbundle distribute
Repository: mesos
Updated Branches:
refs/heads/master 0375e988d -> f105ed772
MESOS-1169: unbundle distribute
Enabling unbundling for distribute python utils.
Review: https://reviews.apache.org/r/24555
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f105ed77
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f105ed77
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f105ed77
Branch: refs/heads/master
Commit: f105ed77212069af2fc67474416f304b8b830a82
Parents: 0375e98
Author: Timothy St. Clair <ts...@redhat.com>
Authored: Thu Aug 14 09:46:12 2014 -0500
Committer: Timothy St. Clair <ts...@redhat.com>
Committed: Thu Aug 14 09:46:12 2014 -0500
----------------------------------------------------------------------
3rdparty/Makefile.am | 2 ++
configure.ac | 45 ++++++++++++++++++++++++++
mpi/mpiexec-mesos.in | 3 +-
src/examples/python/test-containerizer.in | 3 +-
src/examples/python/test-executor.in | 3 +-
src/examples/python/test-framework.in | 3 +-
6 files changed, 51 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/f105ed77/3rdparty/Makefile.am
----------------------------------------------------------------------
diff --git a/3rdparty/Makefile.am b/3rdparty/Makefile.am
index 70b45fe..7cf0c88 100644
--- a/3rdparty/Makefile.am
+++ b/3rdparty/Makefile.am
@@ -65,6 +65,7 @@ CLEAN_EXTRACTED = \
ALL_LOCAL = # Initialize ALL_LOCAL so we can add to it.
if HAS_PYTHON
+if WITH_BUNDLED_DISTRIBUTE
DISTRIBUTE_EGG = \
$(DISTRIBUTE)/dist/$(DISTRIBUTE)$(PYTHON_EGG_PUREPY_POSTFIX).egg
@@ -73,6 +74,7 @@ if HAS_PYTHON
ALL_LOCAL += $(DISTRIBUTE_EGG)
endif
+endif
if WITH_BUNDLED_LEVELDB
http://git-wip-us.apache.org/repos/asf/mesos/blob/f105ed77/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index e2d8371..85799be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,6 +179,13 @@ AC_ARG_WITH([gmock],
location prefixed by the given path]),
[without_bundled_gmock=yes], [])
+AC_ARG_ENABLE([bundled-distribute],
+ AS_HELP_STRING([--disable-bundled-distribute],
+ [excludes building and using the bundled distribute
+ package in lieu of an installed version in
+ in PYTHONPATH]),
+ [without_bundled_distribute=yes], [])
+
AC_ARG_WITH([cxx11],
AS_HELP_STRING([--without-cxx11],
[builds Mesos without C++11 support (deprecated)]),
@@ -1011,6 +1018,44 @@ There are two possible workarounds for this issue:
mesos-ec2 services will not function.
-------------------------------------------------------------------]))
+ # Check if user has asked us to use a preinstalled distribute, or if
+ # they asked us to ignore all bundled libraries while compiling and linking.
+ if test "x$without_bundled_distribute" = "xyes" || \
+ test "x$enable_bundled" != "xyes"; then
+
+ AC_PYTHON_MODULE([distutils], [no])
+ if test "x$HAVE_PYMOD_distutils" = "xno"; then
+ AC_PYTHON_MODULE([setuptools], [no])
+
+ if test "x$HAVE_PYMOD_setuptools" = "xyes"; then
+ found_distribute=yes
+ fi
+
+ else
+ found_distribute=yes
+ fi
+
+ if test "x$found_distribute" = "xyes"; then
+ with_bundled_distribute=no
+ else
+ AC_MSG_ERROR([cannot find distribute
+-------------------------------------------------------------------
+You have requested the use of a non-bundled distribute but no suitable
+distribute could be found.
+
+You may want specify the location of distribute by providing a prefix
+path via --with-distribute=DIR, or check that the path you provided is
+correct if you're already doing this.
+-------------------------------------------------------------------
+])
+ fi
+ else
+ with_bundled_distribute=yes
+ fi
+
+ AM_CONDITIONAL([WITH_BUNDLED_DISTRIBUTE],
+ [test "x$with_bundled_distribute" = "xyes"])
+
has_python=yes
fi
http://git-wip-us.apache.org/repos/asf/mesos/blob/f105ed77/mpi/mpiexec-mesos.in
----------------------------------------------------------------------
diff --git a/mpi/mpiexec-mesos.in b/mpi/mpiexec-mesos.in
index 9aa0702..82a1350 100644
--- a/mpi/mpiexec-mesos.in
+++ b/mpi/mpiexec-mesos.in
@@ -19,8 +19,7 @@ PYTHON=@PYTHON@
DISTRIBUTE_EGG=`echo ${MESOS_BUILD_DIR}/3rdparty/distribute-*/dist/*.egg`
test ! -e ${DISTRIBUTE_EGG} && \
- echo "${RED}Failed to find ${DISTRIBUTE_EGG}${NORMAL}" && \
- exit 1
+ echo "${RED}Failed to find ${DISTRIBUTE_EGG} verify PYTHONPATH${NORMAL}"
PROTOBUF=${MESOS_BUILD_DIR}/3rdparty/libprocess/3rdparty/protobuf-*
PROTOBUF_EGG=`echo ${PROTOBUF}/python/dist/protobuf*.egg`
http://git-wip-us.apache.org/repos/asf/mesos/blob/f105ed77/src/examples/python/test-containerizer.in
----------------------------------------------------------------------
diff --git a/src/examples/python/test-containerizer.in b/src/examples/python/test-containerizer.in
index 3238ccc..c82f3dc 100644
--- a/src/examples/python/test-containerizer.in
+++ b/src/examples/python/test-containerizer.in
@@ -18,8 +18,7 @@ DISTRIBUTE_EGG=${MESOS_BUILD_DIR}/3rdparty/distribute-0.6.26/dist/
DISTRIBUTE_EGG+=distribute-0.6.26@PYTHON_EGG_PUREPY_POSTFIX@.egg
test ! -e ${DISTRIBUTE_EGG} && \
- echo "${RED}Failed to find ${DISTRIBUTE_EGG}${NORMAL}" && \
- exit 1
+ echo "${RED}Failed to find ${DISTRIBUTE_EGG} verify PYTHONPATH${NORMAL}"
PROTOBUF=${MESOS_BUILD_DIR}/3rdparty/libprocess/3rdparty/protobuf-2.5.0
http://git-wip-us.apache.org/repos/asf/mesos/blob/f105ed77/src/examples/python/test-executor.in
----------------------------------------------------------------------
diff --git a/src/examples/python/test-executor.in b/src/examples/python/test-executor.in
index 072fd7d..0725568 100644
--- a/src/examples/python/test-executor.in
+++ b/src/examples/python/test-executor.in
@@ -18,8 +18,7 @@ DISTRIBUTE_EGG=${MESOS_BUILD_DIR}/3rdparty/distribute-0.6.26/dist/
DISTRIBUTE_EGG+=distribute-0.6.26@PYTHON_EGG_PUREPY_POSTFIX@.egg
test ! -e ${DISTRIBUTE_EGG} && \
- echo "${RED}Failed to find ${DISTRIBUTE_EGG}${NORMAL}" && \
- exit 1
+ echo "${RED}Failed to find ${DISTRIBUTE_EGG} verify PYTHONPATH${NORMAL}"
PROTOBUF=${MESOS_BUILD_DIR}/3rdparty/libprocess/3rdparty/protobuf-2.5.0
http://git-wip-us.apache.org/repos/asf/mesos/blob/f105ed77/src/examples/python/test-framework.in
----------------------------------------------------------------------
diff --git a/src/examples/python/test-framework.in b/src/examples/python/test-framework.in
index ee90e55..1a43002 100644
--- a/src/examples/python/test-framework.in
+++ b/src/examples/python/test-framework.in
@@ -18,8 +18,7 @@ DISTRIBUTE_EGG=${MESOS_BUILD_DIR}/3rdparty/distribute-0.6.26/dist/
DISTRIBUTE_EGG+=distribute-0.6.26@PYTHON_EGG_PUREPY_POSTFIX@.egg
test ! -e ${DISTRIBUTE_EGG} && \
- echo "${RED}Failed to find ${DISTRIBUTE_EGG}${NORMAL}" && \
- exit 1
+ echo "${RED}Failed to find ${DISTRIBUTE_EGG} verify PYTHONPATH${NORMAL}"
PROTOBUF=${MESOS_BUILD_DIR}/3rdparty/libprocess/3rdparty/protobuf-2.5.0