3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/kaldi-active-grammar/0003-ffi-path.patch
ckie 25afe58b96
kaldi-active-grammar: init at 2.1.0
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-08-24 01:15:42 +03:00

14 lines
751 B
Diff

diff --git a/kaldi_active_grammar/ffi.py b/kaldi_active_grammar/ffi.py
index 936ed35..1eb2f3d 100644
--- a/kaldi_active_grammar/ffi.py
+++ b/kaldi_active_grammar/ffi.py
@@ -15,7 +15,7 @@ from cffi import FFI
from .utils import exec_dir, platform
_ffi = FFI()
-_library_binary_path = os.path.join(exec_dir, dict(windows='kaldi-dragonfly.dll', linux='libkaldi-dragonfly.so', macos='libkaldi-dragonfly.dylib')[platform])
+_library_binary_path = os.path.join('@kaldiFork@', dict(windows='kaldi-dragonfly.dll', linux='libkaldi-dragonfly.so', macos='libkaldi-dragonfly.dylib')[platform])
_c_source_ignore_regex = re.compile(r'(\b(extern|DRAGONFLY_API)\b)|("C")|(//.*$)', re.MULTILINE) # Pattern for extraneous stuff to be removed
def encode(text):