diff --git a/config.sh b/config.sh index bcf7a7f..1554716 100644 --- a/config.sh +++ b/config.sh @@ -14,7 +14,48 @@ 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 + +# 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_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