MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / run_pkg_config

Function run_pkg_config

external/sentencepiece/python/setup.py:42–53  ·  view source on GitHub ↗
(section, pkg_config_path=None)

Source from the content-addressed store, hash-verified

40
41
42def run_pkg_config(section, pkg_config_path=None):
43 try:
44 cmd = 'pkg-config sentencepiece --{}'.format(section)
45 if pkg_config_path:
46 cmd = 'env PKG_CONFIG_PATH={} {}'.format(pkg_config_path, cmd)
47 output = subprocess.check_output(cmd, shell=True)
48 if sys.version_info >= (3, 0, 0):
49 output = output.decode('utf-8')
50 except subprocess.CalledProcessError:
51 sys.stderr.write('Failed to find sentencepiece pkg-config\n')
52 sys.exit(1)
53 return output.strip().split()
54
55
56def is_sentencepiece_installed():

Callers 2

build_extensionMethod · 0.85
copy_package_dataFunction · 0.85

Calls 3

formatMethod · 0.80
decodeMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected