Ver Fonte

added more debugging output to sitecustomize

Dave Schuyler há 22 anos atrás
pai
commit
95db7ae55f
2 ficheiros alterados com 14 adições e 6 exclusões
  1. 1 1
      direct/src/showbase/mersenne.h
  2. 13 5
      direct/src/showbase/sitecustomize.py

+ 1 - 1
direct/src/showbase/mersenne.h

@@ -62,7 +62,7 @@
    email: [email protected]
    email: [email protected]
 */
 */
 
 
-#include <directbase.h>
+#include "directbase.h"
 
 
 class EXPCL_DIRECT Mersenne {
 class EXPCL_DIRECT Mersenne {
 PUBLISHED:
 PUBLISHED:

+ 13 - 5
direct/src/showbase/sitecustomize.py

@@ -2,14 +2,16 @@ import os
 import sys
 import sys
 import glob
 import glob
 
 
-print 'Site customize for Panda'
+print 'Site customize for Panda:'
 
 
 
 
 def readpth(tree, fullname):
 def readpth(tree, fullname):
+    #print "readpth(tree=%s, fullname=%s)" % (tree, fullname)
     try:
     try:
         f = open(fullname)
         f = open(fullname)
-        print 'Appending paths in ' + fullname
+        print '  Appending paths in ' + fullname
     except IOError:
     except IOError:
+        print '  IOError Appending paths in ' + fullname
         return
         return
 
 
     while 1:
     while 1:
@@ -32,7 +34,10 @@ def addpackage(package):
     comments and empty lines are ok
     comments and empty lines are ok
     """
     """
     tree = os.getenv(package)
     tree = os.getenv(package)
-    
+    if tree == None:
+        print "  $%s is not defined." % (package,)
+        return
+
     lowerPackage = package.lower()
     lowerPackage = package.lower()
     fullname = os.path.join(tree, 'etc', lowerPackage + '.pth')
     fullname = os.path.join(tree, 'etc', lowerPackage + '.pth')
 
 
@@ -56,15 +61,17 @@ def getPackages():
         # the current directory.
         # the current directory.
         player = os.getenv("PLAYER")
         player = os.getenv("PLAYER")
         if player == None:
         if player == None:
+            print '  Appending paths based on current working directory.'
             searchstr = os.path.join('*', 'src', 'configfiles', '*.pth')
             searchstr = os.path.join('*', 'src', 'configfiles', '*.pth')
         else:
         else:
+            print '  Appending paths based on $PLAYER'
             searchstr = os.path.join(player, '*', 'src', 'configfiles', '*.pth')
             searchstr = os.path.join(player, '*', 'src', 'configfiles', '*.pth')
             
             
         filenames = glob.glob(searchstr)
         filenames = glob.glob(searchstr)
         if len(filenames) == 0:
         if len(filenames) == 0:
             print ''
             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 ''
             print ''
             
             
         for filename in filenames:
         for filename in filenames:
@@ -75,6 +82,7 @@ def getPackages():
         # The CTPROJS environment variable *is* defined.  We must be
         # The CTPROJS environment variable *is* defined.  We must be
         # using the ctattach tools; get the *.pth files from the set
         # using the ctattach tools; get the *.pth files from the set
         # of attached trees.
         # of attached trees.
+        print '  Appending paths based on $CTPROJS'
         packages = []
         packages = []
 
 
         for proj in ctprojs.split():
         for proj in ctprojs.split():