Skip to content

Commit a11dabd

Browse files
committed
some cleanup
1 parent 6b406e9 commit a11dabd

File tree

2 files changed

+5
-57
lines changed

2 files changed

+5
-57
lines changed

ci-before-build.sh

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,6 @@ set -e
6969
MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}")
7070
DOWNLOADS_SDIR=downloads
7171
PYPY_URL=https://downloads.python.org/pypy
72-
# For back-compatibility. We use the "ensurepip" module now
73-
# instead of get-pip.py
74-
GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
75-
76-
# Unicode width, default 32. Used here and in travis_linux_steps.sh
77-
# In docker_build_wrap.sh it is passed in when calling "docker run"
78-
# The docker test images also use it when choosing the python to run
79-
# with, so it is passed in when calling "docker run" for tests.
80-
UNICODE_WIDTH=${UNICODE_WIDTH:-32}
8172

8273
if [ $(uname) == "Darwin" ]; then
8374
IS_MACOS=1; IS_OSX=1;
@@ -106,23 +97,7 @@ unset -f cd
10697
unset -f pushd
10798
unset -f popd
10899

109-
function cmd_notexit {
110-
# wraps a command, capturing its return code and preventing it
111-
# from exiting the shell. Handles -e / +e modes.
112-
# Parameters
113-
# cmd - command
114-
# any further parameters are passed to the wrapped command
115-
# If called without an argument, it will exit the shell with an error
116-
local cmd=$1
117-
if [ -z "$cmd" ];then echo "no command"; exit 1; fi
118-
if [[ $- = *e* ]]; then errexit_set=true; fi
119-
set +e
120-
("${@:1}") ; retval=$?
121-
[[ -n $errexit_set ]] && set -e
122-
return $retval
123-
}
124-
125100
# Build OpenBLAS
126101
source build-openblas.sh
127102

128-
source tools/build_prepare.sh
103+
source tools/build_prepare.sh

tools/build_steps.sh

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ function before_build {
3939
# get_macpython_environment ${MB_PYTHON_VERSION} venv
4040
python3.9 -m venv venv
4141
source venv/bin/activate
42-
# Since install_fortran uses `uname -a` to determine arch,
43-
# force the architecture
44-
arch -${PLAT} bash -s << EOF
45-
source tools/gfortran_utils.sh
46-
install_gfortran
47-
EOF
42+
alias gfortran=gfortran-15
4843
# Deployment target set by gfortran_utils
4944
echo "Deployment target $MACOSX_DEPLOYMENT_TARGET"
5045

@@ -60,12 +55,6 @@ function clean_code_local {
6055
local build_commit=${2:-$BUILD_COMMIT}
6156
[ -z "$repo_dir" ] && echo "repo_dir not defined" && exit 1
6257
[ -z "$build_commit" ] && echo "build_commit not defined" && exit 1
63-
# The package $repo_dir may be a submodule. git submodules do not
64-
# have a .git directory. If $repo_dir is copied around, tools like
65-
# Versioneer which require that it be a git repository are unable
66-
# to determine the version. Give submodule proper git directory
67-
# XXX no need to do this
68-
# fill_submodule "$repo_dir"
6958
pushd $repo_dir
7059
echo in $repo_dir
7160
git fetch origin --tags
@@ -124,28 +113,12 @@ function build_lib {
124113
local interface64=${2:-$INTERFACE64}
125114
local nightly=${3:0}
126115
local manylinux=${MB_ML_VER:-1}
127-
# Make directory to store built archive
128116
if [ -n "$IS_OSX" ]; then
129117
# Do build, add gfortran hash to end of name
130118
do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64" "$nightly"
131-
return
119+
else
120+
do_build_lib "$plat" "" "$interface64" "$nightly"
132121
fi
133-
# Manylinux wrapper
134-
local libc=${MB_ML_LIBC:-manylinux}
135-
local docker_image=quay.io/pypa/${libc}${manylinux}_${plat}
136-
# docker pull $docker_image
137-
# # Docker sources this script, and runs `do_build_lib`
138-
# docker run --rm \
139-
# -e BUILD_PREFIX="$BUILD_PREFIX" \
140-
# -e PLAT="${plat}" \
141-
# -e INTERFACE64="${interface64}" \
142-
# -e NIGHTLY="${nightly}" \
143-
# -e PYTHON_VERSION="$MB_PYTHON_VERSION" \
144-
# -e MB_ML_VER=${manylinux} \
145-
# -e MB_ML_LIBC=${libc} \
146-
# -v $PWD:/io \
147-
# $docker_image /io/tools/docker_build_wrap.sh
148-
bash ./tools/docker_build_wrap.sh
149122
}
150123

151124
function patch_source {
@@ -310,7 +283,7 @@ function build_lib_on_travis {
310283
local libc=${MB_ML_LIBC:-manylinux}
311284
local docker_image=quay.io/pypa/${libc}${manylinux}_${plat}
312285
docker pull $docker_image
313-
# Docker sources this script, and runs `do_build_lib`
286+
# run `do_build_lib` in the docker image
314287
docker run --rm \
315288
-e BUILD_PREFIX="$BUILD_PREFIX" \
316289
-e PLAT="${plat}" \

0 commit comments

Comments
 (0)