From cb1c30fbd7255699b8cb4793fdf745da50510edd Mon Sep 17 00:00:00 2001 From: Mark Mine Date: Thu, 12 Oct 2000 22:38:13 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/configfiles/direct.init | 4 ++-- direct/src/ffi/generatePythonCode | 4 +++- direct/src/showbase/ppython | 26 +++++++++++++------------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/direct/src/configfiles/direct.init b/direct/src/configfiles/direct.init index 5e9ef172de..4f30b13c31 100644 --- a/direct/src/configfiles/direct.init +++ b/direct/src/configfiles/direct.init @@ -1,9 +1,9 @@ ATTACH panda MODREL ETC_PATH etc -SEP PYTHONPATH : +SEP PYTHONPATH ; MODREL PYTHONPATH lib MODREL PYTHONPATH lib/py +MODREL PYTHONPATH src/ffi MODREL PYTHONPATH src/actor MODREL PYTHONPATH src/distributed MODREL PYTHONPATH src/showbase -MODREL PYTHONPATH src/ffi \ No newline at end of file diff --git a/direct/src/ffi/generatePythonCode b/direct/src/ffi/generatePythonCode index 53ce939bc2..80639e1879 100644 --- a/direct/src/ffi/generatePythonCode +++ b/direct/src/ffi/generatePythonCode @@ -79,7 +79,9 @@ if (not outputDir): FFIConstants.notify.info('Setting output directory to current directory') outputDir = '.' elif (not os.path.exists(outputDir)): - FFIConstants.notify.error('Directory does not exists: ' + outputDir) + FFIConstants.notify.info('Directory does not exist, creating: ' + outputDir) + os.mkdir(outputDir) + FFIConstants.notify.info('Setting output directory to: ' + outputDir) else: FFIConstants.notify.info('Setting output directory to: ' + outputDir) diff --git a/direct/src/showbase/ppython b/direct/src/showbase/ppython index db45c99f52..769e124ba0 100755 --- a/direct/src/showbase/ppython +++ b/direct/src/showbase/ppython @@ -1,26 +1,26 @@ #! /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 - # Run unbuffered output, with any options passed in exec python -u $* exit 1 fi # 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 - -# 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 # We can't run with -u under windows for some reason. But we do need to