Commit 24936a2a authored by Matthew Brett's avatar Matthew Brett
Browse files

Add test for supported_wheels, with fix

parent 0623c582
...@@ -7,9 +7,10 @@ import sys ...@@ -7,9 +7,10 @@ import sys
from os.path import basename from os.path import basename
try: try:
from wheel.install import WHEEL_INFO_RE from wheel.install import WHEEL_INFO_RE as wheel_matcher
except ImportError: # As of Wheel 0.32.0 except ImportError: # As of Wheel 0.32.0
from wheel.wheelfile import WHEEL_INFO_RE from wheel.wheelfile import WHEEL_INFO_RE
wheel_matcher = WHEEL_INFO_RE.match
try: try:
from pip.pep425tags import get_supported from pip.pep425tags import get_supported
except ImportError: # pip 10 except ImportError: # pip 10
...@@ -18,7 +19,7 @@ except ImportError: # pip 10 ...@@ -18,7 +19,7 @@ except ImportError: # pip 10
def tags_for(fname): def tags_for(fname):
# Copied from WheelFile code # Copied from WheelFile code
parsed_filename = WHEEL_INFO_RE.match(basename(fname)) parsed_filename = wheel_matcher(basename(fname))
tags = parsed_filename.groupdict() tags = parsed_filename.groupdict()
for pyver in tags['pyver'].split('.'): for pyver in tags['pyver'].split('.'):
for abi in tags['abi'].split('.'): for abi in tags['abi'].split('.'):
......
...@@ -29,6 +29,8 @@ if [ -n "$TEST_BUILDS" ]; then ...@@ -29,6 +29,8 @@ if [ -n "$TEST_BUILDS" ]; then
fi fi
fi fi
source tests/test_supported_wheels.sh
# Exit 1 if any test errors # Exit 1 if any test errors
barf barf
# Don't need Travis' machinery trace # Don't need Travis' machinery trace
......
# Test supported wheels script
PYTHON_EXE=${PYTHON_EXE:-python}
if [ -z "$PIP_CMD" ]; then
pip_install="pip install --user"
else
pip_install="$PIP_CMD install"
fi
# Current wheel versions not available for older Pythons
lpv=$(lex_ver $PYTHON_VERSION)
if [ $lpv -ge $(lex_ver 3.5) ] || [ $lpv -lt $(lex_ver 3) ]; then
for whl in wheel==0.31.1 wheel==0.32.0 wheel; do
$pip_install -U $whl
$PYTHON_EXE supported_wheels.py tornado-5.1-cp27-cp27m-macosx_10_6_intel.whl tornado-5.1-cp36-cp36m-macosx_10_13_x86_64.whl texext-0.6.1-cp36-none-any.whl
done
fi
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