()
| 355 | |
| 356 | |
| 357 | def 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 |
no test coverage detected