Skip to content

Commit 291f6a7

Browse files
comoco-xiaofbxiang
authored andcommitted
fix macos building issue
1 parent 573e372 commit 291f6a7

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

scripts/build_mac.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ function build() {
44
echo "Building wheel"
55

66
PY_VERSION=$1
7-
if [ "$PY_VERSION" -eq 311 ]; then
7+
if [ "$PY_VERSION" -eq 39 ]; then
8+
PY_DOT=3.9.20
9+
elif [ "$PY_VERSION" -eq 310 ]; then
10+
PY_DOT=3.10.16
11+
elif [ "$PY_VERSION" -eq 311 ]; then
812
PY_DOT=3.11.10
913
elif [ "$PY_VERSION" -eq 312 ]; then
1014
PY_DOT=3.12.4
@@ -20,12 +24,15 @@ function build() {
2024
pyenv install "${PY_DOT}"
2125
fi
2226
pyenv global "${PY_DOT}"
23-
python --version
27+
pyenv rehash
28+
pyenv exec python --version
2429

25-
python -m pip install setuptools wheel
26-
python setup.py bdist_wheel --build-dir=build --plat-name macosx_12_0_universal2
30+
pyenv exec pip install setuptools wheel
31+
pyenv exec python setup.py bdist_wheel --build-dir=build --plat-name macosx_12_0_universal2
2732
}
2833

34+
build 39
35+
build 310
2936
build 311
3037
build 312
3138
build 313

0 commit comments

Comments
 (0)