Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
66586461
Commit
66586461
authored
Mar 02, 2020
by
mattip
Browse files
move cpython_path to common_utils for pypy discovery during test phase
parent
fd3565f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
33 deletions
+29
-33
common_utils.sh
common_utils.sh
+29
-1
manylinux_utils.sh
manylinux_utils.sh
+0
-32
No files found.
common_utils.sh
View file @
66586461
...
...
@@ -458,6 +458,7 @@ function install_pypy {
fi
PYTHON_EXE=
$(
realpath
$py_build
/bin/pypy
)
$PYTHON_EXE
-mensurepip
$PYTHON_EXE
-mpip install --upgrade pip setuptools wheel
if [ "
$major
" == "
3
" ] && [ ! -x "
$py_build
/bin/pip
" ]; then
ln
$py_build
/bin/pip3
$py_build
/bin/pip
fi
...
...
@@ -560,4 +561,31 @@ function get_py_mm {
$PYTHON_EXE
-c "
import sys
;
print
(
'{0}.{1}'
.format
(
*
sys.version_info[0:2]
))
"
}
function cpython_path {
# Return path to cpython given
# * version (of form "
2.7
")
# * u_width ("
16
" or "
32
" default "
32
")
#
# 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
# 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
if [
$(
lex_ver
$py_ver
)
-ge
$(
lex_ver 3.4
)
] ||
[ "
$u_width
" == "
16
" ]; then
u_suff=""
elif [ "
$u_width
" != "
32
" ]; then
echo "
Incorrect u_width value
$u_width
"
exit 1
fi
local no_dots=
$(
echo
$py_ver
|
tr
-d
.
)
echo "
/opt/python/cp
${
no_dots
}
-cp
${
no_dots
}
$abi_suff
${
u_suff
}
"
}
manylinux_utils.sh
View file @
66586461
...
...
@@ -4,43 +4,11 @@
MULTIBUILD_DIR
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
source
$MULTIBUILD_DIR
/common_utils.sh
# UNICODE_WIDTH selects "32"=wide (UCS4) or "16"=narrow (UCS2/UTF16) builds
UNICODE_WIDTH
=
"
${
UNICODE_WIDTH
:-
32
}
"
function
get_platform
{
# Report platform as given by uname
python
-c
'import platform; print(platform.uname()[4])'
}
function
cpython_path
{
# Return path to cpython given
# * version (of form "2.7")
# * u_width ("16" or "32" default "32")
#
# 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
# 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
if
[
$(
lex_ver
$py_ver
)
-ge
$(
lex_ver 3.4
)
]
||
[
"
$u_width
"
==
"16"
]
;
then
u_suff
=
""
elif
[
"
$u_width
"
!=
"32"
]
;
then
echo
"Incorrect u_width value
$u_width
"
exit
1
fi
local
no_dots
=
$(
echo
$py_ver
|
tr
-d
.
)
echo
"/opt/python/cp
${
no_dots
}
-cp
${
no_dots
}
$abi_suff
${
u_suff
}
"
}
function
repair_wheelhouse
{
local
in_dir
=
$1
local
out_dir
=
${
2
:-
$in_dir
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment