aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/h3/hardcode-h3-path.patch
blob: 87549f298d741c2c9abf75311ec8a1b1559f6371 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/h3/h3.py b/h3/h3.py
index 18cf168..2cc7812 100644
--- a/h3/h3.py
+++ b/h3/h3.py
@@ -34,13 +34,7 @@ from ctypes import (
     POINTER,
 )

-_dirname = os.path.dirname(__file__)
-libh3_path = ('{}/{}'.format(_dirname, 'out/libh3.1.dylib')
-              if platform.system() == 'Darwin' else (
-              '{}/{}'.format(_dirname, 'out/h3.dll') if platform.system() == 'Windows' else
-              '{}/{}'.format(_dirname, 'out/libh3.so.1')))
-
-libh3 = cdll.LoadLibrary(libh3_path)
+libh3 = cdll.LoadLibrary('@libh3_path@')

 # Type of an H3 index
 H3Index = c_ulonglong