Commit 7675c8cb authored by Matthew Brett's avatar Matthew Brett
Browse files

NF: add distutils platform check

To get pip's platform.
parent 81453647
...@@ -299,6 +299,12 @@ function get_platform { ...@@ -299,6 +299,12 @@ function get_platform {
python -c 'import platform; print(platform.uname()[4])' python -c 'import platform; print(platform.uname()[4])'
} }
function get_distutils_platform {
# Report platform as given by distutils get_platform.
# This is the platform tag that pip will use.
python -c "import distutils.util; print(distutils.util.get_platform())"
}
function install_wheel { function install_wheel {
# Install test dependencies and built wheel # Install test dependencies and built wheel
# #
......
...@@ -88,3 +88,7 @@ set_opts $ORIG_OPTS ...@@ -88,3 +88,7 @@ set_opts $ORIG_OPTS
# On Linux docker containers in travis, can only be x86_64 or i686 # On Linux docker containers in travis, can only be x86_64 or i686
[ "$(get_platform)" == x86_64 ] || [ "$(get_platform)" == i686 ] || exit 1 [ "$(get_platform)" == x86_64 ] || [ "$(get_platform)" == i686 ] || exit 1
# Crudest possible check for get_distutils_platform
expected=$(python -c "import distutils.util as du; print(du.get_platform())")
[ "$(get_distutils_platform)" == "$expected" ] || ingest "bad distutils platform"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment