MCPcopy Create free account
hub / github.com/opencv/opencv-python / get_build_env_var_by_name

Function get_build_env_var_by_name

setup.py:284–298  ·  view source on GitHub ↗
(flag_name)

Source from the content-addressed store, hash-verified

282
283
284def get_build_env_var_by_name(flag_name):
285 flag_set = False
286
287 try:
288 flag_set = bool(int(os.getenv("ENABLE_" + flag_name.upper(), None)))
289 except Exception:
290 pass
291
292 if not flag_set:
293 try:
294 flag_set = bool(int(open(flag_name + ".enabled").read(1)))
295 except Exception:
296 pass
297
298 return flag_set
299
300
301# This creates a list which is empty but returns a length of 1.

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected