Skip to content

Commit 3b45e0b

Browse files
committed
use MB_ML_LIBC for package name
1 parent b92e3c7 commit 3b45e0b

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

travis-ci/build_steps.sh

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,33 @@ function before_build {
2626
fi
2727
}
2828

29+
function get_plat_tag {
30+
# Copied from gfortran-install/gfortran_utils.sh, modified for MB_ML_LIBC
31+
32+
# Modify fat architecture tags on macOS to reflect compiled architecture
33+
# For non-darwin, report manylinux version
34+
local plat=$1
35+
local mb_ml_ver=${MB_ML_VER:-1}
36+
local mb_ml_libc=${MB_ML_LIBC:-manylinux}
37+
case $plat in
38+
i686|x86_64|arm64|universal2|intel|aarch64|s390x|ppc64le) ;;
39+
*) echo Did not recognize plat $plat; return 1 ;;
40+
esac
41+
local uname=${2:-$(uname)}
42+
if [ "$uname" != "Darwin" ]; then
43+
if [ "$plat" == "intel" ]; then
44+
echo plat=intel not allowed for Manylinux
45+
return 1
46+
fi
47+
echo "${mb_ml_libc}${mb_ml_ver}_${plat}"
48+
return
49+
fi
50+
# macOS 32-bit arch is i386
51+
[ "$plat" == "i686" ] && plat="i386"
52+
local target=$(echo $MACOSX_DEPLOYMENT_TARGET | tr .- _)
53+
echo "macosx_${target}_${plat}"
54+
}
55+
2956
function build_lib {
3057
# OSX or manylinux build
3158
#
@@ -138,7 +165,7 @@ function do_build_lib {
138165
&& make PREFIX=$BUILD_PREFIX $interface64_flags install )
139166
stop_spinner
140167
local version=$(cd OpenBLAS && git describe --tags --abbrev=8)
141-
local plat_tag=$(get_distutils_platform_ex $plat)
168+
local plat_tag=$(get_plat_tag $plat)
142169
local suff=""
143170
[ -n "$suffix" ] && suff="-$suffix"
144171
if [ "$interface64" = "1" ]; then

0 commit comments

Comments
 (0)