diff --git a/python/setup.py b/python/setup.py index 92d07fa08..b00cd9bde 100644 --- a/python/setup.py +++ b/python/setup.py @@ -51,6 +51,9 @@ def _maybe_add_library_root(lib_name): elif sys.platform == "win32": cflags = ["/std:c++17", "/d2FH4-"] package_data["ctranslate2"] = ["*.dll"] +elif sys.platform == "linux": + cflags.append("-fPIC") + ldflags.append("-Wl,-rpath,-Wl,-rpath,/usr/local/lib64") ctranslate2_module = Extension( "ctranslate2._ext",