Skip to content

Commit

Permalink
Merge pull request #154 from mattip/macos-name
Browse files Browse the repository at this point in the history
use install_name_tool to fix dylib's install_name
  • Loading branch information
mattip authored Apr 17, 2024
2 parents 98162a0 + 74ea513 commit 2d66b4a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
25 changes: 25 additions & 0 deletions patches/0001-do-not-add-LIBNAMESUFFIX-to-dylib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From cb3d41f8c1b0dce4c954937b32eb76f7154c33ee Mon Sep 17 00:00:00 2001
From: Matti Picus <[email protected]>
Date: Wed, 17 Apr 2024 09:24:51 +1000
Subject: [PATCH] do not add LIBNAMESUFFIX to dylib

---
exports/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exports/Makefile b/exports/Makefile
index 33c47d477..457e59b2c 100644
--- a/exports/Makefile
+++ b/exports/Makefile
@@ -137,7 +137,7 @@ libgoto_hpl.def : $(GENSYM)

ifeq ($(OSNAME), Darwin)
ifeq ($(FIXED_LIBNAME),1)
-INTERNALNAME = $(LIBPREFIX)$(LIBNAMESUFFIX).dylib
+INTERNALNAME = $(LIBPREFIX).dylib
else
INTERNALNAME = $(LIBPREFIX).$(MAJOR_VERSION).dylib
endif
--
2.39.3 (Apple Git-146)

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "scipy-openblas64"
version = "0.3.27.44.0"
version = "0.3.27.44.1"
requires-python = ">=3.7"
description = "Provides OpenBLAS for python packaging"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function do_build_lib {
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
USE_OPENMP=0 NUM_THREADS=64 \
BINARY=$bitness $interface_flags $target_flags > /dev/null
BINARY=$bitness $interface_flags $target_flags
make PREFIX=$BUILD_PREFIX $interface_flags install
popd
stop_spinner
Expand Down
8 changes: 8 additions & 0 deletions tools/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ if [[ $py_version != $pkg_version* ]]; then
exit 1
fi

if [ $(uname) == "Darwin" ]; then
soname=$(cd local/scipy_openblas64/lib; ls libscipy_openblas*.dylib)
echo otool -D local/scipy_openblas64/lib/$soname
otool -D local/scipy_openblas64/lib/$soname
# issue 153: there is a ".0" in the install_name. Remove it
install_name_tool -id $soname local/scipy_openblas64/lib/$soname
fi

rm -rf local/scipy_openblas64/lib/pkgconfig
echo "" >> LICENSE.txt
echo "----" >> LICENSE.txt
Expand Down

0 comments on commit 2d66b4a

Please sign in to comment.