Commit a005ed6f authored by Isuru Fernando's avatar Isuru Fernando
Browse files

use MB_PYTHON_OSX_VER

parent 786e81f8
...@@ -425,8 +425,9 @@ function activate_ccache { ...@@ -425,8 +425,9 @@ function activate_ccache {
} }
function macos_intel_build_wrap { function macos_intel_build_wrap {
local py_osx_ver=$(echo ${MB_PYTHON_OSX_VER:-10.9} | sed "s/\./_/g")
export PLAT="x86_64" export PLAT="x86_64"
export _PYTHON_HOST_PLATFORM="macosx-10.9-x86_64" export _PYTHON_HOST_PLATFORM="macosx-${py_osx_ver}-x86_64"
export CFLAGS+=" -arch x86_64" export CFLAGS+=" -arch x86_64"
export CXXFLAGS+=" -arch x86_64" export CXXFLAGS+=" -arch x86_64"
export ARCHFLAGS+=" -arch x86_64" export ARCHFLAGS+=" -arch x86_64"
...@@ -456,15 +457,16 @@ function macos_arm64_build_wrap { ...@@ -456,15 +457,16 @@ function macos_arm64_build_wrap {
function fuse_macos_intel_arm64 { function fuse_macos_intel_arm64 {
local wheelhouse=$(abspath ${WHEEL_SDIR:-wheelhouse}) local wheelhouse=$(abspath ${WHEEL_SDIR:-wheelhouse})
local py_osx_ver=$(echo ${MB_PYTHON_OSX_VER:-10.9} | sed "s/\./_/g")
mkdir -p tmp_fused_wheelhouse mkdir -p tmp_fused_wheelhouse
for whl in $wheelhouse/*.whl; do for whl in $wheelhouse/*.whl; do
if [[ "$whl" == *macosx_10_9_x86_64.whl ]]; then if [[ "$whl" == *macosx_${py_osx_ver}_x86_64.whl ]]; then
whl_base=$(echo $whl | rev | cut -c 23- | rev) whl_base=$(echo $whl | rev | cut -c 23- | rev)
echo $whl_base echo $whl_base
if [[ -f "${whl_base}macosx_11_0_arm64.whl" ]]; then if [[ -f "${whl_base}macosx_11_0_arm64.whl" ]]; then
delocate-fuse $whl "${whl_base}macosx_11_0_arm64.whl" -w tmp_fused_wheelhouse delocate-fuse $whl "${whl_base}macosx_11_0_arm64.whl" -w tmp_fused_wheelhouse
mv tmp_fused_wheelhouse/$(basename $whl) $wheelhouse/$(basename ${whl_base})macosx_10_9_universal2.whl mv tmp_fused_wheelhouse/$(basename $whl) $wheelhouse/$(basename ${whl_base})macosx_${py_osx_ver}_universal2.whl
# Since we want one wheel thats installable for testing we are deleting the 10_9_x86_64 wheel. # Since we want one wheel thats installable for testing we are deleting the *_x86_64 wheel.
# We are not deleting arm64 wheel because the size is lower and homebrew/conda-forge python # We are not deleting arm64 wheel because the size is lower and homebrew/conda-forge python
# will use them by default # will use them by default
rm $whl rm $whl
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment