Skip to content

Commit 8817145

Browse files
authored
Merge pull request #159 from mattip/unpatch2
Unpatch2
2 parents dd55411 + 6183b7f commit 8817145

File tree

7 files changed

+19
-36
lines changed

7 files changed

+19
-36
lines changed

.github/workflows/posix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
INTERFACE64: '1'
4848
env:
4949
REPO_DIR: OpenBLAS
50-
OPENBLAS_COMMIT: "de465ffd"
50+
OPENBLAS_COMMIT: "35d84ad012"
5151
NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
5252
MACOSX_DEPLOYMENT_TARGET: 10.9
5353
MB_PYTHON_VERSION: ${{ matrix.python-version }}

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
workflow_dispatch: null
99

1010
env:
11-
OPENBLAS_COMMIT: "de465ffd"
11+
OPENBLAS_COMMIT: "35d84ad012"
1212
OPENBLAS_ROOT: "c:\\opt"
1313
# Preserve working directory for calls into bash
1414
# Without this, invoking bash will cd to the home directory

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ env:
22
global:
33
# The archive that gets built has name from ``git describe`` on this
44
# commit.
5-
- OPENBLAS_COMMIT="de465ffd"
5+
- OPENBLAS_COMMIT: "35d84ad012"
66
- REPO_DIR=OpenBLAS
77

88
language: python

local/scipy_openblas64/__init__.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,23 @@ def get_lib_dir():
4242
return os.path.join(_HERE, "lib")
4343

4444

45-
def get_library():
46-
"""Return the lib name needed for linking
45+
def get_library(fullname=False):
46+
"""Return the lib name needed for linking. If `fullname` then return the
47+
filename of the library, otherwise return the link name.
4748
"""
4849
if sys.platform == "win32":
4950
libs = [x for x in os.listdir(get_lib_dir()) if x.endswith(".lib")]
50-
return os.path.splitext(libs[0])[0]
51+
if fullname:
52+
return libs[0]
53+
else:
54+
return os.path.splitext(libs[0])[0]
5155
else:
5256
libs = [x for x in os.listdir(get_lib_dir()) if x.startswith("libscipy_openblas")]
53-
# remove the leading lib from libscipy_openblas*
54-
return os.path.splitext(libs[0])[0][3:]
57+
if fullname:
58+
return libs[0]
59+
else:
60+
# remove the leading lib from libscipy_openblas*
61+
return os.path.splitext(libs[0])[0][3:]
5562

5663
def get_pkg_config(use_preloading=False):
5764
"""Return a multi-line string that, when saved to a file, can be used with
@@ -69,7 +76,7 @@ def get_pkg_config(use_preloading=False):
6976
if use_preloading:
7077
libs_flags = ""
7178
else:
72-
libs_flags = f"-L${{libdir}} -l{get_library()}"
79+
libs_flags = f"${{libdir}}/{get_library(fullname=True)} -Wl,-rpath,${{libdir}}"
7380
cflags = "-DBLAS_SYMBOL_PREFIX=scipy_ -DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64 -DOPENBLAS_ILP64_NAMING_SCHEME"
7481
return dedent(f"""\
7582
libdir={get_lib_dir()}

patches/0001-do-not-add-LIBNAMESUFFIX-to-dylib.patch

Lines changed: 0 additions & 25 deletions
This file was deleted.

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

tools/build_wheel.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ if [ $(uname) == "Darwin" ]; then
3939
echo otool -D local/scipy_openblas64/lib/$soname
4040
otool -D local/scipy_openblas64/lib/$soname
4141
# issue 153: there is a ".0" in the install_name. Remove it
42-
install_name_tool -id $soname local/scipy_openblas64/lib/$soname
42+
# also add a @rpath
43+
install_name_tool -id @rpath/$soname local/scipy_openblas64/lib/$soname
4344
fi
4445

4546
rm -rf local/scipy_openblas64/lib/pkgconfig

0 commit comments

Comments
 (0)