Browse Source

Experimental; copy the whole 'direct' tree to 'built' to avoid the hacky __init__.py (which we can't use anymore because of the way the runtime is packaged)

rdb 16 years ago
parent
commit
68f224ff08
1 changed files with 3 additions and 11 deletions
  1. 3 11
      makepanda/makepanda.py

+ 3 - 11
makepanda/makepanda.py

@@ -1389,21 +1389,13 @@ CreatePandaVersionFiles()
 
 ##########################################################################################
 #
-# Generate direct/__init__.py
+# Copy the "direct" tree
 #
 ##########################################################################################
 
-DIRECTINIT="""
-import os,sys
-srcdir1 = os.path.join(__path__[0], 'src')
-srcdir2 = os.path.join(__path__[0], '..', '..', 'direct', 'src')
-if    (os.path.isdir(srcdir1)): __path__[0] = srcdir1
-elif  (os.path.isdir(srcdir2)): __path__[0] = srcdir2
-else: sys.exit("Cannot find the 'direct' tree")
-"""
-
 if (PkgSkip("PYTHON")==0):
-    ConditionalWriteFile(GetOutputDir()+'/direct/__init__.py', DIRECTINIT)
+    CopyTree(GetOutputDir()+'/direct','direct/src')
+    ConditionalWriteFile(GetOutputDir()+'/direct/__init__.py', "")
 
 ##########################################################################################
 #