@@ -26,17 +26,6 @@ function get_os {
2626function before_build {
2727 # Manylinux Python version set in build_lib
2828 if [ -n " $IS_OSX " ]; then
29- if [ ! -e /usr/local/lib ]; then
30- sudo mkdir -p /usr/local/lib
31- sudo chmod 777 /usr/local/lib
32- touch /usr/local/lib/.dir_exists
33- fi
34- if [ ! -e /usr/local/include ]; then
35- sudo mkdir -p /usr/local/include
36- sudo chmod 777 /usr/local/include
37- touch /usr/local/include/.dir_exists
38- fi
39- # get_macpython_environment ${MB_PYTHON_VERSION} venv
4029 python3.9 -m venv venv
4130 source venv/bin/activate
4231 # Use gfortran from conda
@@ -48,6 +37,11 @@ function before_build {
4837 source tools/gfortran_utils.sh
4938 install_gfortran
5039 EOF
40+ # re-export these, since we ran in a shell
41+ export FC="$(find /opt/gfortran/gfortran-darwin-${PLAT}-native/bin -name "*-gfortran")"
42+ local libgfortran="$(find /opt/gfortran/gfortran-darwin-${PLAT}-native/lib -name libgfortran.dylib)"
43+ local libdir=$(dirname $libgfortran)
44+ export FFLAGS="-L$libdir -Wl,-rpath,$libdir"
5145
5246 # Build the objconv tool
5347 (cd ${ROOT_DIR}/objconv && bash ../tools/build_objconv.sh)
@@ -61,13 +55,9 @@ function clean_code {
6155 [ -z "$build_commit" ] && echo "build_commit not defined" && exit 1
6256 pushd OpenBLAS
6357 git fetch origin --tags
64- echo after git fetch origin
6558 git checkout $build_commit
66- echo after git checkout $build_commit
6759 git clean -fxd
68- echo after git clean
6960 git submodule update --init --recursive
70- echo after git submodule update
7161 popd
7262}
7363
0 commit comments