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:511–525  ·  view source on GitHub ↗
(flag_name)

Source from the content-addressed store, hash-verified

509
510
511def get_build_env_var_by_name(flag_name):
512 flag_set = False
513
514 try:
515 flag_set = bool(int(os.getenv("ENABLE_" + flag_name.upper(), None)))
516 except Exception:
517 pass
518
519 if not flag_set:
520 try:
521 flag_set = bool(int(open(flag_name + ".enabled").read(1)))
522 except Exception:
523 pass
524
525 return flag_set
526
527
528# 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