MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / _maybe_add_library_root

Function _maybe_add_library_root

python/setup.py:31–39  ·  view source on GitHub ↗
(lib_name)

Source from the content-addressed store, hash-verified

29
30
31def _maybe_add_library_root(lib_name):
32 if "%s_ROOT" % lib_name in os.environ:
33 root = os.environ["%s_ROOT" % lib_name]
34 include_dirs.append("%s/include" % root)
35 for lib_dir in ("lib", "lib64"):
36 path = "%s/%s" % (root, lib_dir)
37 if os.path.exists(path):
38 library_dirs.append(path)
39 break
40
41
42_maybe_add_library_root("CTRANSLATE2")

Callers 1

setup.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected