diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index f5fd1783..39f8411a 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -47,7 +47,7 @@ jobs: INTERFACE64: '1' env: REPO_DIR: OpenBLAS - OPENBLAS_COMMIT: "de465ffd" + OPENBLAS_COMMIT: "35d84ad012" NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} MACOSX_DEPLOYMENT_TARGET: 10.9 MB_PYTHON_VERSION: ${{ matrix.python-version }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8ecb33f7..6caa41fb 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: null env: - OPENBLAS_COMMIT: "de465ffd" + OPENBLAS_COMMIT: "35d84ad012" OPENBLAS_ROOT: "c:\\opt" # Preserve working directory for calls into bash # Without this, invoking bash will cd to the home directory diff --git a/.travis.yml b/.travis.yml index 2acf4bc3..6163bb8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ env: global: # The archive that gets built has name from ``git describe`` on this # commit. - - OPENBLAS_COMMIT="de465ffd" + - OPENBLAS_COMMIT: "35d84ad012" - REPO_DIR=OpenBLAS language: python diff --git a/local/scipy_openblas64/__init__.py b/local/scipy_openblas64/__init__.py index 1ed475bc..7e44eab5 100644 --- a/local/scipy_openblas64/__init__.py +++ b/local/scipy_openblas64/__init__.py @@ -42,16 +42,23 @@ def get_lib_dir(): return os.path.join(_HERE, "lib") -def get_library(): - """Return the lib name needed for linking +def get_library(fullname=False): + """Return the lib name needed for linking. If `fullname` then return the + filename of the library, otherwise return the link name. """ if sys.platform == "win32": libs = [x for x in os.listdir(get_lib_dir()) if x.endswith(".lib")] - return os.path.splitext(libs[0])[0] + if fullname: + return libs[0] + else: + return os.path.splitext(libs[0])[0] else: libs = [x for x in os.listdir(get_lib_dir()) if x.startswith("libscipy_openblas")] - # remove the leading lib from libscipy_openblas* - return os.path.splitext(libs[0])[0][3:] + if fullname: + return libs[0] + else: + # remove the leading lib from libscipy_openblas* + return os.path.splitext(libs[0])[0][3:] def get_pkg_config(use_preloading=False): """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): if use_preloading: libs_flags = "" else: - libs_flags = f"-L${{libdir}} -l{get_library()}" + libs_flags = f"${{libdir}}/{get_library(fullname=True)} -Wl,-rpath,${{libdir}}" cflags = "-DBLAS_SYMBOL_PREFIX=scipy_ -DBLAS_SYMBOL_SUFFIX=64_ -DHAVE_BLAS_ILP64 -DOPENBLAS_ILP64_NAMING_SCHEME" return dedent(f"""\ libdir={get_lib_dir()} diff --git a/patches/0001-do-not-add-LIBNAMESUFFIX-to-dylib.patch b/patches/0001-do-not-add-LIBNAMESUFFIX-to-dylib.patch deleted file mode 100644 index 9a1956cf..00000000 --- a/patches/0001-do-not-add-LIBNAMESUFFIX-to-dylib.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cb3d41f8c1b0dce4c954937b32eb76f7154c33ee Mon Sep 17 00:00:00 2001 -From: Matti Picus -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) - diff --git a/pyproject.toml b/pyproject.toml index 2fa59f85..bb12b551 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [project] name = "scipy-openblas64" -version = "0.3.27.57.0" +version = "0.3.27.63.0" requires-python = ">=3.7" description = "Provides OpenBLAS for python packaging" readme = "README.md" diff --git a/tools/build_wheel.sh b/tools/build_wheel.sh index f2f2ca9a..fcea8bef 100644 --- a/tools/build_wheel.sh +++ b/tools/build_wheel.sh @@ -39,7 +39,8 @@ if [ $(uname) == "Darwin" ]; then 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 + # also add a @rpath + install_name_tool -id @rpath/$soname local/scipy_openblas64/lib/$soname fi rm -rf local/scipy_openblas64/lib/pkgconfig