From ea21169c046a340f82a126b3c371c95cf4b7362c Mon Sep 17 00:00:00 2001 From: Jeff Whitaker Date: Sun, 20 Mar 2022 07:11:23 -0600 Subject: [PATCH 1/3] remove h5py-wheels submodule --- config.sh | 41 ++++++++++++++++++++++++++++++++++++++++- h5py-wheels | 1 - 2 files changed, 40 insertions(+), 2 deletions(-) delete mode 160000 h5py-wheels diff --git a/config.sh b/config.sh index bcf7a7f..364e297 100644 --- a/config.sh +++ b/config.sh @@ -14,7 +14,46 @@ export OPENSSL_ROOT=openssl-1.0.2u export OPENSSL_HASH=ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16 export CURL_VERSION="7.75.0" -source h5py-wheels/config.sh +#source h5py-wheels/config.sh + +function build_wheel { + if [ -z "$IS_OSX" ]; then + build_linux_wheel $@ + else + build_osx_wheel $@ + fi +} + +function build_linux_wheel { + source multibuild/library_builders.sh + build_libs + # Add workaround for auditwheel bug: + # https://github.com/pypa/auditwheel/issues/29 + local bad_lib="/usr/local/lib/libhdf5.so" + if [ -z "$(readelf --dynamic $bad_lib | grep RUNPATH)" ]; then + patchelf --set-rpath $(dirname $bad_lib) $bad_lib + fi + build_pip_wheel $@ +} + +function build_osx_wheel { + local repo_dir=${1:-$REPO_DIR} + export CC=clang + export CXX=clang++ + install_pkg_config + # Build libraries + source multibuild/library_builders.sh + export ARCH_FLAGS="-arch x86_64" + export CFLAGS=$ARCH_FLAGS + export CXXFLAGS=$ARCH_FLAGS + export FFLAGS=$ARCH_FLAGS + export LDFLAGS=$ARCH_FLAGS + build_libs + # Build wheel + export LDFLAGS="$ARCH_FLAGS -Wall -undefined dynamic_lookup -bundle" + export LDSHARED="$CC $LDFLAGS" + build_pip_wheel "$repo_dir" +} function build_curl2 { if [ -e curl-stamp ]; then return; fi diff --git a/h5py-wheels b/h5py-wheels deleted file mode 160000 index 02d42a7..0000000 --- a/h5py-wheels +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 02d42a77098224b76049048e65741ac5e4d5dc28 From 175cf4c8180a1d51cc241ed3b803bd604870b93c Mon Sep 17 00:00:00 2001 From: Jeff Whitaker Date: Sun, 20 Mar 2022 08:35:43 -0600 Subject: [PATCH 2/3] comment out functions over-ridden by h5py-wheels --- config.sh | 76 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 37 deletions(-) diff --git a/config.sh b/config.sh index 364e297..de3c011 100644 --- a/config.sh +++ b/config.sh @@ -16,44 +16,46 @@ export CURL_VERSION="7.75.0" #source h5py-wheels/config.sh -function build_wheel { - if [ -z "$IS_OSX" ]; then - build_linux_wheel $@ - else - build_osx_wheel $@ - fi -} - -function build_linux_wheel { - source multibuild/library_builders.sh - build_libs - # Add workaround for auditwheel bug: - # https://github.com/pypa/auditwheel/issues/29 - local bad_lib="/usr/local/lib/libhdf5.so" - if [ -z "$(readelf --dynamic $bad_lib | grep RUNPATH)" ]; then - patchelf --set-rpath $(dirname $bad_lib) $bad_lib - fi - build_pip_wheel $@ -} +# copied from h5py-wheels/config.sh -function build_osx_wheel { - local repo_dir=${1:-$REPO_DIR} - export CC=clang - export CXX=clang++ - install_pkg_config - # Build libraries - source multibuild/library_builders.sh - export ARCH_FLAGS="-arch x86_64" - export CFLAGS=$ARCH_FLAGS - export CXXFLAGS=$ARCH_FLAGS - export FFLAGS=$ARCH_FLAGS - export LDFLAGS=$ARCH_FLAGS - build_libs - # Build wheel - export LDFLAGS="$ARCH_FLAGS -Wall -undefined dynamic_lookup -bundle" - export LDSHARED="$CC $LDFLAGS" - build_pip_wheel "$repo_dir" -} +#function build_wheel { +# if [ -z "$IS_OSX" ]; then +# build_linux_wheel $@ +# else +# build_osx_wheel $@ +# fi +#} +# +#function build_linux_wheel { +# source multibuild/library_builders.sh +# build_libs +# # Add workaround for auditwheel bug: +# # https://github.com/pypa/auditwheel/issues/29 +# local bad_lib="/usr/local/lib/libhdf5.so" +# if [ -z "$(readelf --dynamic $bad_lib | grep RUNPATH)" ]; then +# patchelf --set-rpath $(dirname $bad_lib) $bad_lib +# fi +# build_pip_wheel $@ +#} +# +#function build_osx_wheel { +# local repo_dir=${1:-$REPO_DIR} +# export CC=clang +# export CXX=clang++ +# install_pkg_config +# # Build libraries +# source multibuild/library_builders.sh +# export ARCH_FLAGS="-arch x86_64" +# export CFLAGS=$ARCH_FLAGS +# export CXXFLAGS=$ARCH_FLAGS +# export FFLAGS=$ARCH_FLAGS +# export LDFLAGS=$ARCH_FLAGS +# build_libs +# # Build wheel +# export LDFLAGS="$ARCH_FLAGS -Wall -undefined dynamic_lookup -bundle" +# export LDSHARED="$CC $LDFLAGS" +# build_pip_wheel "$repo_dir" +#} function build_curl2 { if [ -e curl-stamp ]; then return; fi From 497dea90567949de7ed9da65e658a155d73c11bc Mon Sep 17 00:00:00 2001 From: Jeff Whitaker Date: Sun, 20 Mar 2022 08:43:36 -0600 Subject: [PATCH 3/3] revert previous commit --- config.sh | 76 +++++++++++++++++++++++++++---------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/config.sh b/config.sh index de3c011..1554716 100644 --- a/config.sh +++ b/config.sh @@ -18,44 +18,44 @@ export CURL_VERSION="7.75.0" # copied from h5py-wheels/config.sh -#function build_wheel { -# if [ -z "$IS_OSX" ]; then -# build_linux_wheel $@ -# else -# build_osx_wheel $@ -# fi -#} -# -#function build_linux_wheel { -# source multibuild/library_builders.sh -# build_libs -# # Add workaround for auditwheel bug: -# # https://github.com/pypa/auditwheel/issues/29 -# local bad_lib="/usr/local/lib/libhdf5.so" -# if [ -z "$(readelf --dynamic $bad_lib | grep RUNPATH)" ]; then -# patchelf --set-rpath $(dirname $bad_lib) $bad_lib -# fi -# build_pip_wheel $@ -#} -# -#function build_osx_wheel { -# local repo_dir=${1:-$REPO_DIR} -# export CC=clang -# export CXX=clang++ -# install_pkg_config -# # Build libraries -# source multibuild/library_builders.sh -# export ARCH_FLAGS="-arch x86_64" -# export CFLAGS=$ARCH_FLAGS -# export CXXFLAGS=$ARCH_FLAGS -# export FFLAGS=$ARCH_FLAGS -# export LDFLAGS=$ARCH_FLAGS -# build_libs -# # Build wheel -# export LDFLAGS="$ARCH_FLAGS -Wall -undefined dynamic_lookup -bundle" -# export LDSHARED="$CC $LDFLAGS" -# build_pip_wheel "$repo_dir" -#} +function build_wheel { + if [ -z "$IS_OSX" ]; then + build_linux_wheel $@ + else + build_osx_wheel $@ + fi +} + +function build_linux_wheel { + source multibuild/library_builders.sh + build_libs + # Add workaround for auditwheel bug: + # https://github.com/pypa/auditwheel/issues/29 + local bad_lib="/usr/local/lib/libhdf5.so" + if [ -z "$(readelf --dynamic $bad_lib | grep RUNPATH)" ]; then + patchelf --set-rpath $(dirname $bad_lib) $bad_lib + fi + build_pip_wheel $@ +} + +function build_osx_wheel { + local repo_dir=${1:-$REPO_DIR} + export CC=clang + export CXX=clang++ + install_pkg_config + # Build libraries + source multibuild/library_builders.sh + export ARCH_FLAGS="-arch x86_64" + export CFLAGS=$ARCH_FLAGS + export CXXFLAGS=$ARCH_FLAGS + export FFLAGS=$ARCH_FLAGS + export LDFLAGS=$ARCH_FLAGS + build_libs + # Build wheel + export LDFLAGS="$ARCH_FLAGS -Wall -undefined dynamic_lookup -bundle" + export LDSHARED="$CC $LDFLAGS" + build_pip_wheel "$repo_dir" +} function build_curl2 { if [ -e curl-stamp ]; then return; fi