Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/api/gmsh.py b/api/gmsh.py 2index 747acb203..02004da5d 100644 3--- a/api/gmsh.py 4+++ b/api/gmsh.py 5@@ -44,44 +44,7 @@ moduledir = os.path.dirname(os.path.realpath(__file__)) 6 parentdir1 = os.path.dirname(moduledir) 7 parentdir2 = os.path.dirname(parentdir1) 8 9-if platform.system() == "Windows": 10- libname = "gmsh-4.11.dll" 11-elif platform.system() == "Darwin": 12- libname = "libgmsh.4.11.dylib" 13-else: 14- libname = "libgmsh.so.4.11" 15- 16-# check if the library is in the same directory as the module... 17-libpath = os.path.join(moduledir, libname) 18- 19-# ... or in the parent directory or its lib or Lib subdirectory 20-if not os.path.exists(libpath): 21- libpath = os.path.join(parentdir1, libname) 22-if not os.path.exists(libpath): 23- libpath = os.path.join(parentdir1, "lib", libname) 24-if not os.path.exists(libpath): 25- libpath = os.path.join(parentdir1, "Lib", libname) 26- 27-# ... or in the parent of the parent directory or its lib or Lib subdirectory 28-if not os.path.exists(libpath): 29- libpath = os.path.join(parentdir2, libname) 30-if not os.path.exists(libpath): 31- libpath = os.path.join(parentdir2, "lib", libname) 32-if not os.path.exists(libpath): 33- libpath = os.path.join(parentdir2, "Lib", libname) 34- 35-# if we couldn't find it, use ctype's find_library utility... 36-if not os.path.exists(libpath): 37- if platform.system() == "Windows": 38- libpath = find_library("gmsh-4.11") 39- if not libpath: 40- libpath = find_library("gmsh") 41- else: 42- libpath = find_library("gmsh") 43- 44-# ... and print a warning if everything failed 45-if not os.path.exists(libpath): 46- print("Warning: could not find Gmsh shared library " + libname) 47+libpath = "@LIBPATH@" 48 49 lib = CDLL(libpath) 50