소스 검색

[fixed][kconfiglib]test kconfiglib is installed and info how to install

LaterComer 1 년 전
부모
커밋
f5a98c6fc8
1개의 변경된 파일11개의 추가작업 그리고 0개의 파일을 삭제
  1. 11 0
      tools/menukconfig.py

+ 11 - 0
tools/menukconfig.py

@@ -30,6 +30,17 @@ import shutil
 import hashlib
 import operator
 
+# test kconfiglib is installed
+try:
+    import kconfiglib
+except ImportError as e:
+    print("Failed to import kconfiglib: " + str(e))
+    print("")
+    print("You may need to install it using:")
+    print("    pip install kconfiglib")
+    print("")
+    sys.exit(1)
+
 DEFAULT_RTT_PACKAGE_URL = 'https://github.com/RT-Thread/packages.git'
 # you can change the package url by defining RTT_PACKAGE_URL, ex:
 #    export RTT_PACKAGE_URL=https://github.com/Varanda-Labs/packages.git