|
@@ -1,26 +1,26 @@
|
|
|
#! /bin/sh
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
-if [ -z "$CYGWIN_ROOT" ]; then
|
|
|
|
|
- # Add our LD_LIBRARY_PATH to the python path so we can pull in panda modules
|
|
|
|
|
- PYTHONPATH="$DIRECT"/src/all/python:"$DIRECT"/lib/py:"$LD_LIBRARY_PATH"
|
|
|
|
|
|
|
+# Linux case
|
|
|
|
|
+if [ -z "$PANDA_ROOT" ]; then
|
|
|
|
|
+ # Convert semicolons back to colons
|
|
|
|
|
+ PYTHONPATH=`echo $PYTHONPATH | sed 'y/;/:/'`
|
|
|
export PYTHONPATH
|
|
export PYTHONPATH
|
|
|
-
|
|
|
|
|
# Run unbuffered output, with any options passed in
|
|
# Run unbuffered output, with any options passed in
|
|
|
exec python -u $*
|
|
exec python -u $*
|
|
|
exit 1
|
|
exit 1
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
# Under Windows/Cygwin, we have to do this whole thing a little differently.
|
|
# Under Windows/Cygwin, we have to do this whole thing a little differently.
|
|
|
-
|
|
|
|
|
-# First, we have to mangle the LD_LIBRARY_PATH into a series of Windows
|
|
|
|
|
-# paths separated by semicolons.
|
|
|
|
|
-PYTHONPATH=
|
|
|
|
|
-for path in `echo $LD_LIBRARY_PATH | sed 'y/:/ /'`; do
|
|
|
|
|
- PYTHONPATH=$PYTHONPATH\;`cygpath -w $path`
|
|
|
|
|
|
|
+# We have to de-cygwinify the semicolon separated PYTHONPATH
|
|
|
|
|
+# The new path
|
|
|
|
|
+NEWPYTHONPATH=
|
|
|
|
|
+# Temporarily change the semicolons into spaces
|
|
|
|
|
+for path in `echo $PYTHONPATH | sed 'y/;/ /'`; do
|
|
|
|
|
+ # For each entry run it through the cygwin filter
|
|
|
|
|
+ NEWPYTHONPATH=$NEWPYTHONPATH\;`cygpath -w $path`
|
|
|
done
|
|
done
|
|
|
-
|
|
|
|
|
-# And now prefix that with the python source directories.
|
|
|
|
|
-PYTHONPATH=`cygpath -w $DIRECT/src/all/python`\;`cygpath -w $DIRECT/lib/py`$PYTHONPATH
|
|
|
|
|
|
|
+# Set the new PYTHONPATH
|
|
|
|
|
+PYTHONPATH=$NEWPYTHONPATH
|
|
|
export PYTHONPATH
|
|
export PYTHONPATH
|
|
|
|
|
|
|
|
# We can't run with -u under windows for some reason. But we do need to
|
|
# We can't run with -u under windows for some reason. But we do need to
|