MCPcopy
hub / github.com/psycopg/psycopg / get_config

Function get_config

psycopg_c/build_backend/psycopg_build_ext.py:19–27  ·  view source on GitHub ↗
(what: str)

Source from the content-addressed store, hash-verified

17
18
19def get_config(what: str) -> str:
20 pg_config = "pg_config"
21 try:
22 out = sp.run([pg_config, f"--{what}"], stdout=sp.PIPE, check=True)
23 except Exception as e:
24 log.error(f"couldn't run {pg_config!r} --{what}: %s", e)
25 raise
26 else:
27 return out.stdout.strip().decode()
28
29
30class psycopg_build_ext(build_ext):

Callers 1

_setup_ext_buildMethod · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected