6d4aeb4377
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
50 lines
1.7 KiB
Diff
50 lines
1.7 KiB
Diff
diff --git a/api/gmsh.py b/api/gmsh.py
|
|
index 747acb203..02004da5d 100644
|
|
--- a/api/gmsh.py
|
|
+++ b/api/gmsh.py
|
|
@@ -44,44 +44,7 @@ moduledir = os.path.dirname(os.path.realpath(__file__))
|
|
parentdir1 = os.path.dirname(moduledir)
|
|
parentdir2 = os.path.dirname(parentdir1)
|
|
|
|
-if platform.system() == "Windows":
|
|
- libname = "gmsh-4.11.dll"
|
|
-elif platform.system() == "Darwin":
|
|
- libname = "libgmsh.4.11.dylib"
|
|
-else:
|
|
- libname = "libgmsh.so.4.11"
|
|
-
|
|
-# check if the library is in the same directory as the module...
|
|
-libpath = os.path.join(moduledir, libname)
|
|
-
|
|
-# ... or in the parent directory or its lib or Lib subdirectory
|
|
-if not os.path.exists(libpath):
|
|
- libpath = os.path.join(parentdir1, libname)
|
|
-if not os.path.exists(libpath):
|
|
- libpath = os.path.join(parentdir1, "lib", libname)
|
|
-if not os.path.exists(libpath):
|
|
- libpath = os.path.join(parentdir1, "Lib", libname)
|
|
-
|
|
-# ... or in the parent of the parent directory or its lib or Lib subdirectory
|
|
-if not os.path.exists(libpath):
|
|
- libpath = os.path.join(parentdir2, libname)
|
|
-if not os.path.exists(libpath):
|
|
- libpath = os.path.join(parentdir2, "lib", libname)
|
|
-if not os.path.exists(libpath):
|
|
- libpath = os.path.join(parentdir2, "Lib", libname)
|
|
-
|
|
-# if we couldn't find it, use ctype's find_library utility...
|
|
-if not os.path.exists(libpath):
|
|
- if platform.system() == "Windows":
|
|
- libpath = find_library("gmsh-4.11")
|
|
- if not libpath:
|
|
- libpath = find_library("gmsh")
|
|
- else:
|
|
- libpath = find_library("gmsh")
|
|
-
|
|
-# ... and print a warning if everything failed
|
|
-if not os.path.exists(libpath):
|
|
- print("Warning: could not find Gmsh shared library " + libname)
|
|
+libpath = "@LIBPATH@"
|
|
|
|
lib = CDLL(libpath)
|
|
|