MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / kconfiglib_check_installed

Function kconfiglib_check_installed

tools/env_utility.py:357–376  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

355
356
357def kconfiglib_check_installed():
358 try:
359 import kconfiglib
360 except ImportError as e:
361 print("\033[1;31m**ERROR**: Failed to import kconfiglib, " + str(e))
362 print("")
363 print("You may need to install it using:")
364 print(" pip install kconfiglib\033[0m")
365 print("")
366 sys.exit(1)
367
368 # set PKGS_DIR envrionment
369 pkg_dir = GetPkgPath()
370 if os.path.exists(pkg_dir):
371 os.environ["PKGS_DIR"] = pkg_dir
372 elif sys.platform != 'win32':
373 touch_env()
374 os.environ["PKGS_DIR"] = GetPkgPath()
375 else:
376 print("\033[1;33m**WARNING**: PKGS_DIR not found, please install ENV tools\033[0m")
377
378
379# menuconfig for Linux and Windows

Callers 3

menuconfigFunction · 0.85
guiconfigFunction · 0.85
defconfigFunction · 0.85

Calls 2

GetPkgPathFunction · 0.85
touch_envFunction · 0.85

Tested by

no test coverage detected