File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636import time
3737import shutil
3838import platform
39+ import imp
3940
4041# --------------------------------------------------------------------------------
4142# Info and config
@@ -168,6 +169,21 @@ def _check_self():
168169 _run_log .info ("Please do not delete the license, otherwise you will not be able to use buildpkg!" )
169170 exit (1 )
170171
172+ # 5. check if the library generated by the license is installed
173+ try :
174+ imp .find_module ('lice' )
175+ found = True
176+ except ImportError :
177+ if sys .version_info < (3 , 0 ):
178+ os .system ("easy_install lice" )
179+ _run_log .info ("The license generation module was not found, Automatic installation by easy_install!" )
180+ else :
181+ os .system ("pip install lice" )
182+ _run_log .info ("The license generation module was not found, Automatic installation! by pip" )
183+
184+ # 6. 检查模板文件是否存在
185+ # 7. 检查包路径是否存在
186+
171187# --------------------------------------------------------------------------------
172188# Analyze the path to use
173189# --------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments