Skip to content

use new LIBNAMEPREFIX, LIBNAMESUFFIS, FIXED_LIBNAME options instead of patching #141

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 3 commits into from
Feb 26, 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: "v0.3.26"
OPENBLAS_COMMIT: "5403900539"
NIGHTLY: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
MACOSX_DEPLOYMENT_TARGET: 10.9
MB_PYTHON_VERSION: ${{ matrix.python-version }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ main ]

env:
OPENBLAS_COMMIT: "v0.3.26"
OPENBLAS_COMMIT: "5403900539"
OPENBLAS_ROOT: "c:\\opt"
# Preserve working directory for calls into bash
# Without this, invoking bash will cd to the home directory
Expand All @@ -27,6 +27,7 @@ jobs:
fail-fast: false
runs-on: ${{ matrix.os }}

timeout-minutes: 90
steps:
- uses: actions/[email protected]
- name: install-rtools
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="v0.3.26"
- OPENBLAS_COMMIT="5403900539"
- REPO_DIR=OpenBLAS

language: python
Expand Down
2 changes: 1 addition & 1 deletion OpenBLAS
185 changes: 0 additions & 185 deletions patches/0001-create-a-single-shared-object.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.26.0.5"
version = "0.3.26.238.0"
requires-python = ">=3.7"
description = "Provides OpenBLAS for python packaging"
readme = "README.md"
Expand Down
7 changes: 4 additions & 3 deletions tools/build_openblas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ if [ "$if_bits" == "64" ]; then
else
interface_flags=""
fi
interface_flags="$interface_flags SYMBOLPREFIX=scipy_"
# On windows, the LIBNAMEPREFIX is not needed, SYMBOLPREFIX is added to the lib
# name LIBPREFIX in Makefile.system.
interface_flags="$interface_flags SYMBOLPREFIX=scipy_ FIXED_LIBNAME=1"

# Build name for output library from gcc version and OpenBLAS commit.
GCC_TAG="gcc_$(gcc -dumpversion | tr .- _)"
OPENBLAS_VERSION=$(git describe --tags --abbrev=8)
# Build OpenBLAS
# Variable used in creating output libraries
export LIBNAMESUFFIX=${OPENBLAS_VERSION}-${GCC_TAG}
make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
NUM_THREADS=24 NO_WARMUP=1 NO_AFFINITY=1 CONSISTENT_FPCSR=1 \
BUILD_LAPACK_DEPRECATED=1 TARGET=PRESCOTT BUFFERSIZE=20\
Expand All @@ -100,7 +101,7 @@ make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
MAX_STACK_ALLOC=2048 \
$interface_flags
make PREFIX=$openblas_root/$build_bits $interface_flags install
DLL_BASENAME=libscipy_openblas${SYMBOLSUFFIX}_${LIBNAMESUFFIX}
DLL_BASENAME=libscipy_openblas${SYMBOLSUFFIX}${LIBNAMESUFFIX}

# OpenBLAS does not build a symbol-suffixed static library on Windows:
# do it ourselves. On 32-bit builds, the objcopy.def names need a '_' prefix
Expand Down
5 changes: 3 additions & 2 deletions tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,18 @@ function do_build_lib {
esac
case $interface64 in
1)
local interface_flags="INTERFACE64=1 SYMBOLSUFFIX=64_ SYMBOLPREFIX=scipy_ OBJCONV=$PWD/objconv/objconv";
local interface_flags="INTERFACE64=1 SYMBOLSUFFIX=64_ LIBNAMESUFFIX=64_ OBJCONV=$PWD/objconv/objconv";
local symbolsuffix="64_";
if [ -n "$IS_OSX" ]; then
$PWD/objconv/objconv --help
fi
;;
*)
local interface_flags="SYMBOLPREFIX=scipy_ OBJCONV=$PWD/objconv/objconv"
local interface_flags="OBJCONV=$PWD/objconv/objconv"
local symbolsuffix="";
;;
esac
interface_flags="$interface_flags SYMBOLPREFIX=scipy_ LIBNAMEPREFIX=scipy_ FIXED_LIBNAME=1"
mkdir -p libs
start_spinner
set -x
Expand Down