Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Build Lite
提交
4b01cc5c
B
Build Lite
项目概览
OpenHarmony
/
Build Lite
大约 1 年 前同步成功
通知
22
Star
24
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Build Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4b01cc5c
编写于
7月 12, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
!510 hb supports dependency checking
Merge pull request !510 from lipengzheng_gitee/dep_check
上级
ff3d0227
b3b0f04d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
49 addition
and
3 deletion
+49
-3
hb_internal/build/build.py
hb_internal/build/build.py
+6
-1
hb_internal/env/env.py
hb_internal/env/env.py
+43
-2
未找到文件。
hb_internal/build/build.py
浏览文件 @
4b01cc5c
...
...
@@ -16,12 +16,15 @@
# limitations under the License.
#
import
os
import
sys
from
collections
import
defaultdict
from
hb_internal.build.build_process
import
Build
from
hb_internal.set.set
import
set_product
from
hb_internal.common.utils
import
get_current_time
from
hb_internal.common.utils
import
OHOSException
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../../../"
)))
from
scripts.tools_checker
import
check_build_requried_packages
,
check_os_version
def
add_options
(
parser
):
...
...
@@ -118,6 +121,8 @@ def add_options(parser):
def
exec_command
(
args
):
host_info
=
check_os_version
()
check_build_requried_packages
(
host_info
[
1
])
if
len
(
args
.
product
):
if
'@'
in
args
.
product
[
0
]:
product
,
company
=
args
.
product
[
0
].
split
(
'@'
)
...
...
hb_internal/env/env.py
浏览文件 @
4b01cc5c
...
...
@@ -16,16 +16,38 @@
# limitations under the License.
#
import
os
import
sys
from
hb_internal
import
CONFIG_JSON
from
hb_internal.common.utils
import
read_json_file
from
hb_internal.common.utils
import
hb_info
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../../../"
)))
from
scripts.tools_checker
import
check_build_requried_packages
,
check_os_version
OPTIONS_FUN_LIST
=
[
{
"para"
:
"check"
,
"function"
:
"check_dep"
}
]
def
add_options
(
parser
):
pass
parser
.
add_argument
(
'--check'
,
help
=
'compile-time environment dependencies'
,
action
=
'store_true'
)
def
exec_command
(
args
):
def
check_dep
():
host_info
=
check_os_version
()
packages_info
=
check_build_requried_packages
(
host_info
[
1
],
check
=
False
)
hb_info
(
'necessary_package: {}'
.
format
(
','
.
join
(
packages_info
[
0
])))
hb_info
(
'installed_package: {}'
.
format
(
','
.
join
(
packages_info
[
1
])))
hb_info
(
'uninstalled_package: {}'
.
format
(
','
.
join
(
packages_info
[
2
])))
def
check_os_info
():
json_data
=
read_json_file
(
CONFIG_JSON
)
root_path
=
json_data
.
get
(
'root_path'
,
'not set'
)
board
=
json_data
.
get
(
'board'
,
'not set'
)
...
...
@@ -42,3 +64,22 @@ def exec_command(args):
hb_info
(
'product path: {}'
.
format
(
product_path
))
hb_info
(
'device path: {}'
.
format
(
device_path
))
hb_info
(
'device company: {}'
.
format
(
device_company
))
def
para_to_function
(
para
):
for
options
in
OPTIONS_FUN_LIST
:
if
options
[
"para"
]
==
para
:
eval
(
options
[
"function"
])()
def
exec_command
(
args
):
args_list
=
[
e
for
e
in
dir
(
args
)
if
not
e
.
startswith
(
'_'
)]
for
para
in
args_list
:
options_list
=
[]
options_list
.
append
(
"args.{}"
.
format
(
para
))
for
_options
in
options_list
:
if
eval
(
_options
):
para_to_function
(
para
)
break
else
:
check_os_info
()
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录