Skip to content

Unpatch2 #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 13 additions & 6 deletions local/scipy_openblas64/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()}
Expand Down
25 changes: 0 additions & 25 deletions patches/0001-do-not-add-LIBNAMESUFFIX-to-dylib.patch

This file was deleted.

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.57.0"
version = "0.3.27.63.0"
requires-python = ">=3.7"
description = "Provides OpenBLAS for python packaging"
readme = "README.md"
Expand Down
3 changes: 2 additions & 1 deletion tools/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down