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
8605156c
Commit
8605156c
authored
Feb 26, 2019
by
Rob Buckley
Browse files
add test of installed cpython distutils tag
parent
077c066f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
tests/test_python_install.sh
tests/test_python_install.sh
+18
-1
No files found.
tests/test_python_install.sh
View file @
8605156c
...
...
@@ -22,8 +22,10 @@ then
fi
python_mm
=
"
${
cpython_version
:0:1
}
.
${
cpython_version
:2:1
}
"
#
Remove
implementation prefix
#
extract
implementation prefix
and version
if
[[
"
$PYTHON_VERSION
"
=
~
(
pypy-
)
?
([
0-9
\.
]
+
)
]]
;
then
_impl
=
${
BASH_REMATCH
[1]
:-
"cp"
}
requested_impl
=
${
_impl
:0:2
}
requested_version
=
${
BASH_REMATCH
[2]
}
else
ingest
"Error parsing PYTHON_VERSION=
$PYTHON_VERSION
"
...
...
@@ -58,3 +60,18 @@ else # not virtualenv
ingest
"Wrong macpython pip '
$PIP_CMD
'"
fi
fi
# for cpython, check macos version and arch are as expected
distutils_plat
=
$(
$PYTHON_EXE
-c
"import distutils.util; print(distutils.util.get_platform())"
)
echo
"Python cmd archs:
$(
lipo
-info
$(
which
$PYTHON_EXE
))
"
if
[[
$requested_impl
=
'cp'
]]
;
then
echo
"Cpython, checking platform..."
expected_tag
=
"macosx-
${
MB_PYTHON_OSX_VER
}
-
$(
mac_cpython_arch_for_osx_ver
)
"
if
!
[[
$distutils_plat
==
$expected_tag
]]
;
then
ingest
"Wrong Python platform tag:
${
distutils_plat
}
!=
${
expected_tag
}
"
fi
elif
[[
$requested_impl
=
'py'
]]
;
then
echo
"Pypy, skipping platform check..."
else
ingest
"Invalid impl: '
${
requested_impl
}
', expecting 'cp' or 'py'"
fi
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