Skip to content

Commit

Permalink
fixes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Oct 5, 2019
1 parent 8011f3e commit bf2897a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions manylinux_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ function cpython_path {
#
# For back-compatibility "u" as u_width also means "32"
local py_ver="${1:-2.7}"
local abi_suff=m
local u_width="${2:-${UNICODE_WIDTH}}"
local u_suff=u
local m=m
# Python 3.8 and up no longer uses the PYMALLOC 'm' suffix
# https://github.com/pypa/wheel/pull/303
if [ $(lex_ver $py_ver) -ge $(lex_ver 3.8) ]; then
abi_suff=""
fi
# Back-compatibility
if [ "$u_width" == "u" ]; then u_width=32; fi
# For Python >= 3.4, "u" suffix not meaningful
Expand All @@ -32,12 +37,8 @@ function cpython_path {
echo "Incorrect u_width value $u_width"
exit 1
fi
# Python 3.8 and up no longer uses the PYMALLOC 'm' suffix
if [ $(lex_ver $py_ver) -ge $(lex_ver 3.8) ]; then
m=""
fi
local no_dots=$(echo $py_ver | tr -d .)
echo "/opt/python/cp${no_dots}-cp${no_dots}$m${u_suff}"
echo "/opt/python/cp${no_dots}-cp${no_dots}$abi_suff${u_suff}"
}

function repair_wheelhouse {
Expand Down

0 comments on commit bf2897a

Please sign in to comment.