From ba2d94cc63ffc1239aa538bfb47a82bfcc876cf0 Mon Sep 17 00:00:00 2001 From: Stefano Mazzocchi Date: Tue, 1 Jun 2010 06:56:58 +0000 Subject: [PATCH] make sure that pywin32 extensions are available on windows when executing windmill git-svn-id: http://google-refine.googlecode.com/svn/trunk@928 7d457c2a-affb-35e4-300a-418c747d4874 --- gridworks | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gridworks b/gridworks index 5a9e9b806..17269183c 100755 --- a/gridworks +++ b/gridworks @@ -125,6 +125,14 @@ check_python() { fi } +check_pywin32() { + PYWIN32="`$PYTHON -c 'import win32api' 2>&1`" + + if [ ! -z "$PYWIN32" ]; then + error "This action requires you to have 'pywin32' windows extensions for Python installed on your machine. You can download it for free at http://sourceforge.net/projects/pywin32/" + fi +} + check_running() { check_downloaders URL="http://${GRIDWORKS_HOST}:${GRIDWORKS_PORT}/" @@ -320,6 +328,7 @@ windmill_prepare() { virtualenv_prepare if $CYGWIN ; then + check_pywin32 WINDMILL="$PYTHON_HOME/Scripts/windmill.exe" else WINDMILL="$PYTHON_HOME/bin/windmill"