@@ -26,6 +26,33 @@ function before_build {
26
26
fi
27
27
}
28
28
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
+
29
56
function build_lib {
30
57
# OSX or manylinux build
31
58
#
@@ -138,7 +165,7 @@ function do_build_lib {
138
165
&& make PREFIX=$BUILD_PREFIX $interface64_flags install )
139
166
stop_spinner
140
167
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 )
142
169
local suff=" "
143
170
[ -n " $suffix " ] && suff=" -$suffix "
144
171
if [ " $interface64 " = " 1" ]; then
0 commit comments