Skip to content

Commit 2d66b4a

Browse files
authored
Merge pull request #154 from mattip/macos-name
use install_name_tool to fix dylib's install_name
2 parents 98162a0 + 74ea513 commit 2d66b4a

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From cb3d41f8c1b0dce4c954937b32eb76f7154c33ee Mon Sep 17 00:00:00 2001
2+
From: Matti Picus <matti.picus@gmail.com>
3+
Date: Wed, 17 Apr 2024 09:24:51 +1000
4+
Subject: [PATCH] do not add LIBNAMESUFFIX to dylib
5+
6+
---
7+
exports/Makefile | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/exports/Makefile b/exports/Makefile
11+
index 33c47d477..457e59b2c 100644
12+
--- a/exports/Makefile
13+
+++ b/exports/Makefile
14+
@@ -137,7 +137,7 @@ libgoto_hpl.def : $(GENSYM)
15+
16+
ifeq ($(OSNAME), Darwin)
17+
ifeq ($(FIXED_LIBNAME),1)
18+
-INTERNALNAME = $(LIBPREFIX)$(LIBNAMESUFFIX).dylib
19+
+INTERNALNAME = $(LIBPREFIX).dylib
20+
else
21+
INTERNALNAME = $(LIBPREFIX).$(MAJOR_VERSION).dylib
22+
endif
23+
--
24+
2.39.3 (Apple Git-146)
25+

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
88

99
[project]
1010
name = "scipy-openblas64"
11-
version = "0.3.27.44.0"
11+
version = "0.3.27.44.1"
1212
requires-python = ">=3.7"
1313
description = "Provides OpenBLAS for python packaging"
1414
readme = "README.md"

tools/build_steps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function do_build_lib {
170170
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
171171
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
172172
USE_OPENMP=0 NUM_THREADS=64 \
173-
BINARY=$bitness $interface_flags $target_flags > /dev/null
173+
BINARY=$bitness $interface_flags $target_flags
174174
make PREFIX=$BUILD_PREFIX $interface_flags install
175175
popd
176176
stop_spinner

tools/build_wheel.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ if [[ $py_version != $pkg_version* ]]; then
3434
exit 1
3535
fi
3636

37+
if [ $(uname) == "Darwin" ]; then
38+
soname=$(cd local/scipy_openblas64/lib; ls libscipy_openblas*.dylib)
39+
echo otool -D local/scipy_openblas64/lib/$soname
40+
otool -D local/scipy_openblas64/lib/$soname
41+
# issue 153: there is a ".0" in the install_name. Remove it
42+
install_name_tool -id $soname local/scipy_openblas64/lib/$soname
43+
fi
44+
3745
rm -rf local/scipy_openblas64/lib/pkgconfig
3846
echo "" >> LICENSE.txt
3947
echo "----" >> LICENSE.txt

0 commit comments

Comments
 (0)