Skip to content

Commit ab46c97

Browse files
committed
create a single shared object
1 parent f544ee0 commit ab46c97

File tree

3 files changed

+77
-3
lines changed

3 files changed

+77
-3
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
From f3f6eeba8e569e66a0f92b9e58f8465924f636f4 Mon Sep 17 00:00:00 2001
2+
From: mattip <[email protected]>
3+
Date: Fri, 19 Jan 2024 15:13:13 +0200
4+
Subject: [PATCH] build a single shared object
5+
6+
---
7+
Makefile | 5 -----
8+
Makefile.system | 3 +++
9+
exports/Makefile | 4 ++--
10+
3 files changed, 5 insertions(+), 7 deletions(-)
11+
12+
diff --git a/Makefile b/Makefile
13+
index 8621a8b3f..0febfd0a6 100644
14+
--- a/Makefile
15+
+++ b/Makefile
16+
@@ -134,17 +134,12 @@ shared : libs netlib $(RELA)
17+
ifneq ($(NO_SHARED), 1)
18+
ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku FreeBSD DragonFly))
19+
@$(MAKE) -C exports so
20+
- @ln -fs $(LIBSONAME) $(LIBPREFIX).so
21+
- @ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
22+
endif
23+
ifeq ($(OSNAME), $(filter $(OSNAME),OpenBSD NetBSD))
24+
@$(MAKE) -C exports so
25+
- @ln -fs $(LIBSONAME) $(LIBPREFIX).so
26+
endif
27+
ifeq ($(OSNAME), Darwin)
28+
@$(MAKE) -C exports dyn
29+
- @ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib
30+
- @ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib
31+
endif
32+
ifeq ($(OSNAME), WINNT)
33+
@$(MAKE) -C exports dll
34+
diff --git a/Makefile.system b/Makefile.system
35+
index 30b0ddec2..b2c92b99a 100644
36+
--- a/Makefile.system
37+
+++ b/Makefile.system
38+
@@ -1695,6 +1695,9 @@ LIBNAME_P = $(LIBPREFIX)p$(REVISION)_p.$(LIBSUFFIX)
39+
endif
40+
endif
41+
42+
+# Override for scipy-openblas: don't put the revision into the so name
43+
+LIBNAME = $(LIBPREFIX).$(LIBSUFFIX)
44+
+LIBNAME_P = $(LIBPREFIX)_p.$(LIBSUFFIX)
45+
46+
LIBDLLNAME = $(LIBPREFIX).dll
47+
IMPLIBNAME = lib$(LIBNAMEBASE).dll.a
48+
diff --git a/exports/Makefile b/exports/Makefile
49+
index 7682f851d..632fa324b 100644
50+
--- a/exports/Makefile
51+
+++ b/exports/Makefile
52+
@@ -132,7 +132,7 @@ libgoto_hpl.def : $(GENSYM)
53+
./$(GENSYM) win2khpl $(ARCH) dummy $(EXPRECISION) $(NO_CBLAS) $(NO_LAPACK) $(NO_LAPACKE) $(NEED2UNDERSCORES) $(ONLY_CBLAS) "$(SYMBOLPREFIX)" "$(SYMBOLSUFFIX)" $(BUILD_LAPACK_DEPRECATED) $(BUILD_BFLOAT16) $(BUILD_SINGLE) $(BUILD_DOUBLE) $(BUILD_COMPLEX) $(BUILD_COMPLEX16) > $(@F)
54+
55+
ifeq ($(OSNAME), Darwin)
56+
-INTERNALNAME = $(LIBPREFIX).$(MAJOR_VERSION).dylib
57+
+INTERNALNAME = $(LIBPREFIX).dylib
58+
endif
59+
60+
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
61+
@@ -169,7 +169,7 @@ INTERNALNAME = $(LIBPREFIX).so
62+
FEXTRALIB += -lm
63+
EXTRALIB += -lm
64+
else
65+
-INTERNALNAME = $(LIBPREFIX).so.$(MAJOR_VERSION)
66+
+INTERNALNAME = $(LIBPREFIX).so
67+
endif
68+
69+
ifeq (, $(SYMBOLPREFIX)$(SYMBOLSUFFIX))
70+
--
71+
2.34.1
72+

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.24.95.1"
11+
version = "0.3.24.95.2"
1212
requires-python = ">=3.7"
1313
description = "Provides OpenBLAS for python packaging"
1414
readme = "README.md"

tools/build_steps.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ function build_lib {
9393

9494
function patch_source {
9595
# Runs inside OpenBLAS directory
96-
# bash does not like an empty function, add a null statement
97-
:
96+
# Make the patches by git format-patch <old commit>
97+
for f in $(ls ../patches); do
98+
git apply ../patches/$f
99+
done
98100
}
99101

100102
function do_build_lib {

0 commit comments

Comments
 (0)