Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CHEL01.
MegEngine
提交
8cf1de4a
MegEngine
项目概览
CHEL01.
/
MegEngine
与 Fork 源项目一致
Fork自
MegEngine 天元 / MegEngine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
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`/../../../")
...
@@ -38,7 +38,13 @@ SRC_DIR=$($READLINK -f "`dirname $0`/../../../")
source
${
SRC_DIR
}
/scripts/whl/utils/utils.sh
source
${
SRC_DIR
}
/scripts/whl/utils/utils.sh
ALL_PYTHON
=
${
ALL_PYTHON
}
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
}
]]
if
[[
-z
${
ALL_PYTHON
}
]]
then
then
ALL_PYTHON
=
${
FULL_PYTHON_VER
}
ALL_PYTHON
=
${
FULL_PYTHON_VER
}
...
@@ -76,7 +82,7 @@ function config_python_env() {
...
@@ -76,7 +82,7 @@ function config_python_env() {
elif
[
"
$1
"
=
"3.7.7"
]
;
then
elif
[
"
$1
"
=
"3.7.7"
]
;
then
PYTHON_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.7m
PYTHON_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.7m
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
/lib/libpython3.7m.dylib
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_INCLUDE_DIR
=
${
PYTHON_DIR
}
include/python3.8
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
/lib/libpython3.8.dylib
PYTHON_LIBRARY
=
${
PYTHON_DIR
}
/lib/libpython3.8.dylib
elif
[
"
$1
"
=
"3.9.4"
]
;
then
elif
[
"
$1
"
=
"3.9.4"
]
;
then
...
@@ -220,7 +226,11 @@ function do_build() {
...
@@ -220,7 +226,11 @@ function do_build() {
cd
${
BUILD_DIR
}
/staging/dist/
cd
${
BUILD_DIR
}
/staging/dist/
org_whl_name
=
`
ls
Meg
*
.whl
`
org_whl_name
=
`
ls
Meg
*
.whl
`
index
=
`
awk
-v
a
=
"
${
org_whl_name
}
"
-v
b
=
"-macosx"
'BEGIN{print index(a,b)}'
`
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
"org whl name:
${
org_whl_name
}
"
echo
"comapt whl name:
${
compat_whl_name
}
"
echo
"comapt whl name:
${
compat_whl_name
}
"
cp
${
BUILD_DIR
}
/staging/dist/Meg
*
.whl
${
MACOS_WHL_HOME
}
/
${
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
...
@@ -45,21 +45,29 @@ fi
SRC_DIR
=
$(
$READLINK
-f
"
`
dirname
$0
`
/../../../"
)
SRC_DIR
=
$(
$READLINK
-f
"
`
dirname
$0
`
/../../../"
)
echo
${
SRC_DIR
}
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
)
USER
=
$(
whoami
)
function
install_python_package
()
{
function
install_python_package
()
{
for
pak
in
${
ALL_PYTHON
}
for
pak
in
${
ALL_PYTHON
}
do
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
if
[
-e
/Users/
${
USER
}
/.pyenv/versions/
${
pak
}
]
;
then
echo
"FOUND install /Users/
${
USER
}
/.pyenv/versions/
${
pak
}
strip it..."
echo
"FOUND install /Users/
${
USER
}
/.pyenv/versions/
${
pak
}
strip it..."
else
else
os_ver
=
$(
sw_vers
-productVersion
|
awk
'{print int($0)}'
)
os_ver
=
$(
sw_vers
-productVersion
|
awk
'{print int($0)}'
)
if
[
$os_ver
-lt
11
]
;
then
if
[
[
$os_ver
-lt
11
||
$platform
=
'arm64'
]
;
then
env
PYTHON_CONFIGURE_OPTS
=
"--enable-shared"
pyenv
install
${
pak
}
env
PYTHON_CONFIGURE_OPTS
=
"--enable-shared"
PYTHON_CONFIGURE_OPTS
=
"--enable-framework"
pyenv
install
${
pak
}
else
else
PYTHON_CONFIGURE_OPTS
=
"--enable-shared"
\
PYTHON_CONFIGURE_OPTS
=
"--enable-shared"
\
PYTHON_CONFIGURE_OPTS
=
"--enable-framework"
\
CFLAGS
=
"-I
$(
brew
--prefix
openssl
)
/include -I
$(
brew
--prefix
bzip2
)
/include
\
CFLAGS
=
"-I
$(
brew
--prefix
openssl
)
/include -I
$(
brew
--prefix
bzip2
)
/include
\
-I
$(
brew
--prefix
readline
)
/include -I
$(
xcrun
--show-sdk-path
)
/usr/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"
\
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录