]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
[Windows] omniORB add_dll_directory and OPENTURNS_SALOME compilation issue. See issue...
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 30 Oct 2024 12:47:57 +0000 (13:47 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 30 Oct 2024 12:47:57 +0000 (13:47 +0100)
products/omniORBpy.pyconf
products/openturns.pyconf
products/patches/omniORBpy-4.2.6.p1.patch [new file with mode: 0644]
products/patches/openturns-1.23.0002.patch [new file with mode: 0644]

index a45511425430566d63688678dbc415cf153d27c0..2387d15e5513702c0e0600095c0a3ae53ed010a1 100644 (file)
@@ -16,8 +16,18 @@ default :
     {
       incremental : "yes"
     }
+    patches : []
 }
 
+version_4_2_6:
+{
+  patches : []
+}
+
+version_4_2_6_win:
+{
+  patches : ['omniORBpy-4.2.6.p1.patch']
+}
 
 version_4_2_5:
 {
index d0a23f7c8609efe2022142f764270d17186e2248..fbb5efce3df62c068be314618574fb936f5d4d8d 100644 (file)
@@ -52,7 +52,7 @@ version_1_23_win :
     build_dir : $APPLICATION.workdir + $VARS.sep + 'BUILD' + $VARS.sep + $name
     depend : ['Python', 'openblas', 'hdf5', 'tbb', 'nlopt', 'libxml2', 'eigen', 'matplotlib', 'fftw']
     opt_depend : ['pandas', 'statsmodels', 'patsy']
-    patches : []
+    patches : ['openturns-1.23.0002.patch']
     properties :
     {
       single_install_dir : "no"
diff --git a/products/patches/omniORBpy-4.2.6.p1.patch b/products/patches/omniORBpy-4.2.6.p1.patch
new file mode 100644 (file)
index 0000000..9d90c53
--- /dev/null
@@ -0,0 +1,33 @@
+--- omniORBpy-4.2.6_ref/python3/omniORB/__init__.py    2020-09-18 18:13:06.000000000 +0200
++++ omniORBpy-4.2.6_dev/python3/omniORB/__init__.py    2024-10-30 13:36:43.392056333 +0100
+@@ -42,29 +42,7 @@
+     raise ImportError("Python executable has no thread support")
+ omniorb_dll_path = None
+-
+-if sys.platform == "win32" and hasattr(os, "add_dll_directory"):
+-    # Python 3.8 on Windows no longer looks in PATH to find DLLs,
+-    # meaning that importing the omniORBpy extension modules fails.
+-    # You can set the OMNIORB_DLL_PATH environment variable to the
+-    # directory they are in, or this attempts to find them in the
+-    # default location.
+-    omniorb_dll_path = os.environ.get("OMNIORB_DLL_PATH")
+-
+-    if omniorb_dll_path is None:
+-        omniorb_dll_path = os.path.abspath(
+-                               os.path.join(os.path.dirname(__file__),
+-                                            r"..\..\..\bin\x86_win32"))
+-
+-    if not os.path.isdir(omniorb_dll_path):
+-        omniorb_dll_path = None
+-
+-
+-if omniorb_dll_path is not None:
+-    with os.add_dll_directory(omniorb_dll_path):
+-        import _omnipy
+-else:
+-    import _omnipy
++import _omnipy
+ _coreVersion = _omnipy.coreVersion()
+ __version__  = _omnipy.__version__
diff --git a/products/patches/openturns-1.23.0002.patch b/products/patches/openturns-1.23.0002.patch
new file mode 100644 (file)
index 0000000..a859802
--- /dev/null
@@ -0,0 +1,15 @@
+--- openturns-1.23_ref/openturns-1.23/lib/src/Base/Common/openturns/Log.hxx    2024-10-30 13:29:08.526681253 +0100
++++ openturns-1.23_dev/openturns-1.23/lib/src/Base/Common/openturns/Log.hxx    2024-10-30 13:30:05.420229339 +0100
+@@ -21,6 +21,12 @@
+ #ifndef OPENTURNS_LOG_HXX
+ #define OPENTURNS_LOG_HXX
++#ifdef WIN32
++  #ifdef ERROR
++   #undef ERROR
++  #endif
++#endif
++
+ #include <fstream>
+ #include <map>
+ #include "openturns/OTprivate.hxx"