diff --git a/ShellB3/shallbethree.sh b/ShellB3/shallbethree.sh index a658b545983c52093bc94d7cf06dbd60d133a928..3f5549c9db059b00ecfc89082b0544424d10233b 100755 --- a/ShellB3/shallbethree.sh +++ b/ShellB3/shallbethree.sh @@ -1879,6 +1879,41 @@ _configure_make_install() { purge_static_duplicates } +_maybefixwheel(){ + wheelname="$( find $1 -type f)" + if isNotDarwin ; then + echo Not Darwin 2>&1 + return 0 + fi + if [ ${DARWINVERNUMBER} -lt $( macVersionToDarwinVersion 11.0 ) ] ; then + echo Not 11+ 2>&1 + return 0 + fi + if [ ${DARWINVERNUMBER} -eq $( macVersionToDarwinVersion 11.0 ) ] ; then + if doesnt_contain macosx $( basename ${wheelname} ) ; then + echo not native build $( basename ${wheelname} ) 2>&1 + return 0 + elif contains macosx_11_0 $( basename ${wheelname} ) ; then + echo fine build 2>&1 + return 0 + elif contains macosx_11_1 $( basename ${wheelname} ) || contains macosx_11_2 $( basename ${wheelname} ) ; then + echo must fix build 11.x for 11.0 2>&1 + WORKD=$( mktemp -d -t whf ) + fullwheel=`pwd`/${wheelname} + pushd ${WORKD} + if [ -e ${wheelname} ] ; then + fullwheel=${wheelname} + fi + unzip ${fullwheel} + sed -i .bak -e s,macosx_11_1,macosx_11_0,g -e s,macosx_11_2,macosx_11_0,g *-info/WHEEL + rm *-info/WHEEL.bak ${fullwheel} + newwheel=$( echo ${fullwheel} | sed -e s,macosx_11_1,macosx_11_0,g -e s,macosx_11_2,macosx_11_0,g ) + zip -r ${newwheel} * + popd + fi + fi + return 0 +} # _setup_build_install name tarball_path build_dir setup_options... _setup_build_install() { @@ -1893,9 +1928,9 @@ _setup_build_install() { (cd build/${buildir} \ && ( ( isNotFalse CANPIP && ${PYTHON} "${BASE}/bin/pip${PYFSVER}" install -vvv ${extra_parameters} ${PIP_PARAMETERS} $( for f in "$@" ; do echo --build-option="$f" ; done ) .) \ || ( isNotFalse CANPIP && ${PYTHON} "${BASE}/bin/pip${PYFSVER}" wheel -vvv ${extra_parameters} ${PIP_PARAMETERS} $( for f in "$@" ; do echo --build-option="$f" ; done ) . \ - && ${PYTHON} "${BASE}/bin/pip${PYFSVER}" install ${extra_parameters} ${PIP_PARAMETERS} *.whl ) \ - || ( test -e setup.py && ${PYTHON} setup.py bdist_wheel --keep-temp ${PYBUILDFLAGS} \ - && ${PYTHON} "${BASE}/bin/pip${PYFSVER}" install ${extra_parameters} ${PIP_PARAMETERS} dist/*.whl ) \ + && _maybefixwheel *.whl && ${PYTHON} "${BASE}/bin/pip${PYFSVER}" install ${extra_parameters} ${PIP_PARAMETERS} *.whl ) \ + || ( test -e setup.py && ${PYTHON} setup.py bdist_wheel --keep-temp ${PYBUILDFLAGS} && _maybefixwheel dist/*.whl \ + && ${PYTHON} "${BASE}/bin/pip${PYFSVER}" install ${extra_parameters} ${PIP_PARAMETERS} dist/*.whl ) \ ) ) \ || oops "${name} pip build/install failed" else @@ -4734,11 +4769,7 @@ diff -ru setup.py setup.py # Snappy is disabled by default '-DDEACTIVATE_SNAPPY:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_SNAPPY', '0'))), PATCH - if isDarwin && isARM ; then - CANWHEEL=NO DISABLE_BLOSC_AVX2=YESS _setup_build_install blosc src/optional/blosc-${PYBLOSCVER}.tar.gz blosc-${PYBLOSCVER} - else DISABLE_BLOSC_AVX2=YESS _setup_build_install blosc src/optional/blosc-${PYBLOSCVER}.tar.gz blosc-${PYBLOSCVER} - fi reid $( find *ib* -name libblosc.* -type f )