]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
use omnipatch for tests on WIN32
authorptv <ptv@opencascade.com>
Fri, 5 May 2006 06:55:56 +0000 (06:55 +0000)
committerptv <ptv@opencascade.com>
Fri, 5 May 2006 06:55:56 +0000 (06:55 +0000)
src/Container/SALOME_ContainerPy.py
src/KERNEL_PY/import_hook.py
src/KERNEL_PY/kernel_shared_modules.py
src/KERNEL_PY/salome.py
src/KERNEL_PY/salome_shared_modules.py

index 61e2626b48a62e56386cecb5358551f766b73c64..246b98d8cfed5ebb0ad7f4b5e661e8bb15b2a0eb 100755 (executable)
@@ -32,9 +32,7 @@ import os
 import sys
 import string
 
-# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
-if not sys.platform == "win32":
-    import omnipatch                     # PAL10310
+import omnipatch                     # PAL10310
     
 from omniORB import CORBA, PortableServer
 import SALOMEDS 
index 79725c6273838ad0d6595a47a1d360e5fb9028b9..36bbdb7b469fa78029dac41047aaf0a525e5506e 100755 (executable)
@@ -76,6 +76,7 @@ def set_shared_imported_with_copy(name,module):
 def import_hook(name, globals=None, locals=None, fromlist=None):
     #print "import_hook",name,fromlist
     module=get_shared_imported(name)
+
     if module:
        sys.modules[name]=module
        return module
index bf391f8118aed7707a98e4f3859e87f9e870da9a..ed86187896b94d5b4b857c8e3236f28a35ab1fe8 100755 (executable)
@@ -22,10 +22,8 @@ import omniORB
 register_name("CosNaming")
 import CosNaming
 
-# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
-if not sys.platform == "win32":
-   register_name("omnipatch")
-   import omnipatch
+register_name("omnipatch")
+import omnipatch
 
 import Engines
 import SALOME
index 58299dbc53bfe946c40f359016e35662560b8800..9ed2dadc5bf12d90914a94cdce9aa45b7be7a567 100755 (executable)
@@ -25,9 +25,7 @@
 #  $Header$
 
 import sys
-# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
-if not sys.platform == "win32":
-    import omnipatch 
+import omnipatch 
 
 from salome_kernel import *
 from salome_study import *
index b9fe3a95bdef5027e2212db355683454595ce00e..ddb656dcdca8b24b68c7a38f709ff87546450bde 100755 (executable)
@@ -57,12 +57,7 @@ import import_hook
 # shared_imported, patterns, register_name, register_pattern
 # will be shared by all Python sub interpretors
 
-# On Win32, don't use omnipatch with omniOrb 4.0.7 so far
-if not sys.platform == "win32":
-    from omnipatch import shared_imported
-    import_hook.shared_imported=shared_imported
-else:
-    shared_imported=import_hook.shared_imported
+shared_imported=import_hook.shared_imported
 
 from import_hook import patterns
 from import_hook import register_name
@@ -77,15 +72,23 @@ list_modules=[]
 
 # Import all *_shared_modules in the path and store them in list_modules
 path=salome_path.split(":")
+
+print path
 for rep in path:
     # Import all *_shared_modules in rep
-    for f in glob.glob(os.path.join(rep,"lib","python"+sys.version[:3],"site-packages","salome","shared_modules","*_shared_modules.py")):
+    glob_path = os.path.join(rep,"lib","python"+sys.version[:3],"site-packages","salome","shared_modules","*_shared_modules.py")
+    if sys.platform == "win32":
+       glob_path = os.path.join(rep,"win32","python","shared_modules","*_shared_modules.py")
+    for f in glob.glob(glob_path):
         try:
            name=os.path.splitext(os.path.basename(f))[0]
            register_name(name)
+           #print name + " REGISTERED"
            m=__import__(name)
+           #print name + " IMPORTED"
            list_modules.append(m)
         except:
+           print "Exception during register and import shared module"
            pass
 
 #