Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
02783250
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
403
Star
4705
Fork
582
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
02783250
编写于
7月 24, 2020
作者:
M
Megvii Engine Team
提交者:
Xu Xinran
8月 04, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(python/import/macos): fix some macos user import crash
GitOrigin-RevId: b701710b743d1384606a9d6bdbd62e4a1ddcc4d3
上级
5133d9a3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
6 deletion
+14
-6
python_module/CMakeLists.txt
python_module/CMakeLists.txt
+1
-0
scripts/whl/macos/macos_build_whl.sh
scripts/whl/macos/macos_build_whl.sh
+13
-6
未找到文件。
python_module/CMakeLists.txt
浏览文件 @
02783250
...
...
@@ -68,6 +68,7 @@ add_custom_target(version_ld SOURCES ${VERSION_SCRIPT})
set_target_properties
(
mgb PROPERTIES LIBRARY_OUTPUT_DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/megengine/_internal
)
if
(
APPLE
)
target_link_libraries
(
mgb megbrain megdnn
)
set_target_properties
(
mgb PROPERTIES LINK_FLAGS
"-undefined dynamic_lookup"
)
else
()
target_link_libraries
(
mgb megbrain megdnn -Wl,--version-script=
${
VERSION_SCRIPT
}
)
endif
()
...
...
scripts/whl/macos/macos_build_whl.sh
浏览文件 @
02783250
...
...
@@ -65,17 +65,15 @@ function config_python_env() {
fi
echo
${
ver
}
#config a dir to trick cmake find a null pythonlib
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
lib/
if
[
"
$1
"
=
"3.5.9"
]
;
then
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
lib/libpython3.5m.dylib
PYTHON_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.5m
elif
[
"
$1
"
=
"3.6.10"
]
;
then
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
lib/libpython3.6m.dylib
PYTHON_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.6m
elif
[
"
$1
"
=
"3.7.7"
]
;
then
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
lib/libpython3.7m.dylib
PYTHON_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.7m
elif
[
"
$1
"
=
"3.8.3"
]
;
then
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
lib/libpython3.8.dylib
PYTHON_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.8
else
echo
"ERR: DO NOT SUPPORT PYTHON VERSION"
...
...
@@ -91,7 +89,7 @@ function do_build() {
config_python_env
${
ver
}
#check env
if
[
!
-
f
"
$PYTHON_LIBRARY
"
]
;
then
if
[
!
-
d
"
$PYTHON_LIBRARY
"
]
;
then
echo
"ERR: can not find
$PYTHON_LIBRARY
, Invalid python package"
err_env
fi
...
...
@@ -131,7 +129,16 @@ function do_build() {
llvm-strip
-s
_mgb.so
cd
${
BUILD_DIR
}
/staging
${
PYTHON_DIR
}
/bin/python3 setup.py bdist_wheel
cp
${
BUILD_DIR
}
/staging/dist/Meg
*
.whl
${
MACOS_WHL_HOME
}
/
cd
${
BUILD_DIR
}
/staging/dist/
org_whl_name
=
`
ls
Meg
*
.whl
`
index
=
`
awk
-v
a
=
"
${
org_whl_name
}
"
-v
b
=
"-macosx"
'BEGIN{print index(a,b)}'
`
#compat for osx version from 10.5(Leopard)
#FIXME: same no need at -macosx-version-min=10.5 for build so
compat_whl_name
=
`
echo
${
org_whl_name
}
|cut
-b
-
$index
`
macosx_10_5_x86_64.whl
echo
"org whl name:
${
org_whl_name
}
"
echo
"comapt whl name:
${
compat_whl_name
}
"
cp
${
BUILD_DIR
}
/staging/dist/Meg
*
.whl
${
MACOS_WHL_HOME
}
/
${
compat_whl_name
}
cd
${
SRC_DIR
}
echo
""
echo
"##############################################################################################"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录