From 95db7ae55fde8cdb5df8eb3fafcec4150f719742 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Tue, 6 May 2003 04:38:30 +0000 Subject: [PATCH] added more debugging output to sitecustomize --- direct/src/showbase/mersenne.h | 2 +- direct/src/showbase/sitecustomize.py | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/direct/src/showbase/mersenne.h b/direct/src/showbase/mersenne.h index 2fea02d342..e58c325b66 100644 --- a/direct/src/showbase/mersenne.h +++ b/direct/src/showbase/mersenne.h @@ -62,7 +62,7 @@ email: matumoto@math.keio.ac.jp */ -#include +#include "directbase.h" class EXPCL_DIRECT Mersenne { PUBLISHED: diff --git a/direct/src/showbase/sitecustomize.py b/direct/src/showbase/sitecustomize.py index 28eedcca98..3592cc96eb 100644 --- a/direct/src/showbase/sitecustomize.py +++ b/direct/src/showbase/sitecustomize.py @@ -2,14 +2,16 @@ import os import sys import glob -print 'Site customize for Panda' +print 'Site customize for Panda:' def readpth(tree, fullname): + #print "readpth(tree=%s, fullname=%s)" % (tree, fullname) try: f = open(fullname) - print 'Appending paths in ' + fullname + print ' Appending paths in ' + fullname except IOError: + print ' IOError Appending paths in ' + fullname return while 1: @@ -32,7 +34,10 @@ def addpackage(package): comments and empty lines are ok """ tree = os.getenv(package) - + if tree == None: + print " $%s is not defined." % (package,) + return + lowerPackage = package.lower() fullname = os.path.join(tree, 'etc', lowerPackage + '.pth') @@ -56,15 +61,17 @@ def getPackages(): # the current directory. player = os.getenv("PLAYER") if player == None: + print ' Appending paths based on current working directory.' searchstr = os.path.join('*', 'src', 'configfiles', '*.pth') else: + print ' Appending paths based on $PLAYER' searchstr = os.path.join(player, '*', 'src', 'configfiles', '*.pth') filenames = glob.glob(searchstr) if len(filenames) == 0: print '' - print 'Warning: no files found matching %s.' % (searchstr) - print 'Check $PLAYER, or your starting directory.' + print ' Warning: no files found matching %s.' % (searchstr) + print ' Check $PLAYER, or your starting directory.' print '' for filename in filenames: @@ -75,6 +82,7 @@ def getPackages(): # The CTPROJS environment variable *is* defined. We must be # using the ctattach tools; get the *.pth files from the set # of attached trees. + print ' Appending paths based on $CTPROJS' packages = [] for proj in ctprojs.split():