Skip to content

Commit 41f6f7a

Browse files
committed
always use gfortran from conda on macos, update to gfortran-15
1 parent 92e5374 commit 41f6f7a

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta"
99
[project]
1010
name = "scipy-openblas64"
1111
# v0.3.30-349-gf6df9beb
12-
version = "0.3.30.349.0"
12+
version = "0.3.30.349.1"
1313
requires-python = ">=3.7"
1414
description = "Provides OpenBLAS for python packaging"
1515
readme = "README.md"

tools/build_steps.sh

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ function before_build {
3939
# get_macpython_environment ${MB_PYTHON_VERSION} venv
4040
python3.9 -m venv venv
4141
source venv/bin/activate
42-
alias gfortran=gfortran-15
42+
# Use gfortran from conda
43+
# Since install_fortran uses `uname -a` to determine arch,
44+
# force the architecture when using rosetta
45+
unalias gfortran || true
46+
arch -${PLAT} bash -s << " EOF"
47+
source ${ROOT_DIR}/gfortran-install/gfortran_utils.sh
48+
install_gfortran
49+
EOF
4350
# Deployment target set by gfortran_utils
4451
echo "Deployment target $MACOSX_DEPLOYMENT_TARGET"
4552
@@ -150,14 +157,6 @@ function do_build_lib {
150157
Darwin-x86_64)
151158
local bitness=64
152159
local target="CORE2"
153-
# Use gfortran-11
154-
unalias gfortran
155-
# Since install_fortran uses `uname -a` to determine arch,
156-
# force the architecture
157-
arch -${PLAT} bash -s << EOF
158-
source ${ROOT_DIR}/gfortran-install/gfortran_utils.sh
159-
install_gfortran
160-
EOF
161160
export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
162161
CFLAGS="$CFLAGS -arch x86_64"
163162
export SDKROOT=${SDKROOT:-$(xcrun --show-sdk-path)}

tools/gfortran_utils.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,29 +105,29 @@ if [ "$(uname)" == "Darwin" ]; then
105105
export MACOSX_DEPLOYMENT_TARGET=$mac_target
106106
# Keep this for now as some builds might depend on this being
107107
# available before install_gfortran is called
108-
export GFORTRAN_SHA=c469a420d2d003112749dcdcbe3c684eef42127e
109108
# Set SDKROOT env variable if not set
110109
export SDKROOT=${SDKROOT:-$(xcrun --show-sdk-path)}
111110

112111
function download_and_unpack_gfortran {
113112
local arch=$1
114113
local type=$2
115-
curl -L -O https://github.com/isuruf/gcc/releases/download/gcc-11.3.0-2/gfortran-darwin-${arch}-${type}.tar.gz
114+
curl -L -O https://github.com/isuruf/gcc/releases/download/gcc-15.2.0/gfortran-darwin-${arch}-${type}.tar.gz
116115
case ${arch}-${type} in
117116
arm64-native)
118-
export GFORTRAN_SHA=0d5c118e5966d0fb9e7ddb49321f63cac1397ce8
117+
export GFORTRAN_SHA=999a91eef894d32f99e3b641520bef9f475055067f301f0f1947b8b716b5922a
119118
;;
120119
arm64-cross)
121-
export GFORTRAN_SHA=527232845abc5af21f21ceacc46fb19c190fe804
120+
export GFORTRAN_SHA=39ef2590629c2f238f1a67469fa429d8d6362425b277abb57fd2f3c982568a3f
122121
;;
123122
x86_64-native)
124-
export GFORTRAN_SHA=c469a420d2d003112749dcdcbe3c684eef42127e
123+
export GFORTRAN_SHA=fb03c1f37bf0258ada6e3e41698e3ad416fff4dad448fd746e01d8ccf1efdc0f
125124
;;
126125
x86_64-cross)
127-
export GFORTRAN_SHA=107604e57db97a0ae3e7ca7f5dd722959752f0b3
126+
export GFORTRAN_SHA=0a19ca91019a75501e504eed1cad2be6ea92ba457ec815beb0dd28652eb0ce3f
128127
;;
128+
*) echo Did not recognize arch-plat $arch-$plat; return 1 ;;
129129
esac
130-
if [[ "$(shasum gfortran-darwin-${arch}-${type}.tar.gz)" != "${GFORTRAN_SHA} gfortran-darwin-${arch}-${type}.tar.gz" ]]; then
130+
if [[ "$(sha256sum gfortran-darwin-${arch}-${type}.tar.gz)" != "${GFORTRAN_SHA} gfortran-darwin-${arch}-${type}.tar.gz" ]]; then
131131
echo "shasum mismatch for gfortran-darwin-${arch}-${type}"
132132
exit 1
133133
fi

0 commit comments

Comments
 (0)