Skip to content

Commit d9d59a7

Browse files
committed
package libctranslate2.so in wheel to avoid import errors
Signed-off-by: yzewei <[email protected]>
1 parent 617405f commit d9d59a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def _maybe_add_library_root(lib_name):
5151
elif sys.platform == "win32":
5252
cflags = ["/std:c++17", "/d2FH4-"]
5353
package_data["ctranslate2"] = ["*.dll"]
54+
elif sys.platform == "linux":
55+
cflags.append("-fPIC")
56+
ldflags.append("-Wl,-rpath,-Wl,-rpath,/usr/local/lib64")
5457

5558
ctranslate2_module = Extension(
5659
"ctranslate2._ext",

0 commit comments

Comments
 (0)