Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
8cf1de4a
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
404
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看板
提交
8cf1de4a
编写于
9月 25, 2022
作者:
I
is-shidian
提交者:
SugarHww
10月 14, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix pyenv python version,pyenv install,file location,file name,and compat for x86_64 and arm64
上级
6a0d797a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
7 deletion
+25
-7
scripts/whl/macos/macos_build_whl.sh
scripts/whl/macos/macos_build_whl.sh
+13
-3
scripts/whl/macos/macos_whl_env_prepare.sh
scripts/whl/macos/macos_whl_env_prepare.sh
+12
-4
未找到文件。
scripts/whl/macos/macos_build_whl.sh
浏览文件 @
8cf1de4a
...
...
@@ -38,7 +38,13 @@ SRC_DIR=$($READLINK -f "`dirname $0`/../../../")
source
${
SRC_DIR
}
/scripts/whl/utils/utils.sh
ALL_PYTHON
=
${
ALL_PYTHON
}
FULL_PYTHON_VER
=
"3.6.10 3.7.7 3.8.3 3.9.4"
platform
=
$(
uname
-m
|
awk
'{print $0}'
)
if
[
$platform
=
'arm64'
]
;
then
FULL_PYTHON_VER
=
"3.8.10 3.9.4 3.10.1"
else
FULL_PYTHON_VER
=
"3.6.10 3.7.7 3.8.3 3.9.4"
fi
if
[[
-z
${
ALL_PYTHON
}
]]
then
ALL_PYTHON
=
${
FULL_PYTHON_VER
}
...
...
@@ -76,7 +82,7 @@ function config_python_env() {
elif
[
"
$1
"
=
"3.7.7"
]
;
then
PYTHON_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.7m
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
/lib/libpython3.7m.dylib
elif
[
"
$1
"
=
"3.8.3"
]
;
then
elif
[
[
"
$1
"
=
"3.8.3"
||
"
$1
"
=
"3.8.10"
]
]
;
then
PYTHON_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.8
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
/lib/libpython3.8.dylib
elif
[
"
$1
"
=
"3.9.4"
]
;
then
...
...
@@ -220,7 +226,11 @@ function do_build() {
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_whl_name
=
`
echo
${
org_whl_name
}
|cut
-b
-
$index
`
macosx_10_14_x86_64.whl
if
[
$platform
=
'arm64'
]
;
then
compat_whl_name
=
`
echo
${
org_whl_name
}
|cut
-b
-
$index
`
macosx_10_14_universal2.whl
else
compat_whl_name
=
`
echo
${
org_whl_name
}
|cut
-b
-
$index
`
macosx_10_14_x86_64.whl
fi
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
}
...
...
scripts/whl/macos/macos_whl_env_prepare.sh
浏览文件 @
8cf1de4a
...
...
@@ -45,21 +45,29 @@ fi
SRC_DIR
=
$(
$READLINK
-f
"
`
dirname
$0
`
/../../../"
)
echo
${
SRC_DIR
}
ALL_PYTHON
=
"3.6.10 3.7.7 3.8.3 3.9.4 3.10.1"
platform
=
$(
uname
-m
|
awk
'{print $0}'
)
if
[
$platform
=
'arm64'
]
;
then
ALL_PYTHON
=
"3.8.10 3.9.4 3.10.1"
else
ALL_PYTHON
=
"3.6.10 3.7.7 3.8.3 3.9.4 3.10.1"
fi
USER
=
$(
whoami
)
function
install_python_package
()
{
for
pak
in
${
ALL_PYTHON
}
do
echo
"###### do command: env PYTHON_CONFIGURE_OPTS=
\"
--enable-shared
\"
pyenv install
${
pak
}
"
echo
"###### do command: env PYTHON_CONFIGURE_OPTS=
\"
--enable-shared
\"
PYTHON_CONFIGURE_OPTS=
\"
--enable-framework
\"
pyenv install
${
pak
}
"
if
[
-e
/Users/
${
USER
}
/.pyenv/versions/
${
pak
}
]
;
then
echo
"FOUND install /Users/
${
USER
}
/.pyenv/versions/
${
pak
}
strip it..."
else
os_ver
=
$(
sw_vers
-productVersion
|
awk
'{print int($0)}'
)
if
[
$os_ver
-lt
11
]
;
then
env
PYTHON_CONFIGURE_OPTS
=
"--enable-shared"
pyenv
install
${
pak
}
if
[
[
$os_ver
-lt
11
||
$platform
=
'arm64'
]
;
then
env
PYTHON_CONFIGURE_OPTS
=
"--enable-shared"
PYTHON_CONFIGURE_OPTS
=
"--enable-framework"
pyenv
install
${
pak
}
else
PYTHON_CONFIGURE_OPTS
=
"--enable-shared"
\
PYTHON_CONFIGURE_OPTS
=
"--enable-framework"
\
CFLAGS
=
"-I
$(
brew
--prefix
openssl
)
/include -I
$(
brew
--prefix
bzip2
)
/include
\
-I
$(
brew
--prefix
readline
)
/include -I
$(
xcrun
--show-sdk-path
)
/usr/include"
\
LDFLAGS
=
"-L
$(
brew
--prefix
openssl
)
/lib -L
$(
brew
--prefix
readline
)
/lib -L
$(
brew
--prefix
zlib
)
/lib -L
$(
brew
--prefix
bzip2
)
/lib"
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录