1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #2915 from minrk/soabi-cp35-split

get only first part of SOABI for ABI tag
This commit is contained in:
Donald Stufft 2015-06-23 12:34:19 -04:00
commit c68a56dfed
2 changed files with 22 additions and 1 deletions

View file

@ -67,7 +67,7 @@ def get_supported(versions=None, noarch=False):
soabi = None
if soabi and soabi.startswith('cpython-'):
abis[0:0] = ['cp' + soabi.split('-', 1)[-1]]
abis[0:0] = ['cp' + soabi.split('-')[1]]
abi3s = set()
import imp

View file

@ -307,6 +307,27 @@ class TestPEP425Tags(object):
with patch('pip.pep425tags.sysconfig.get_config_var', raises_ioerror):
assert len(pip.pep425tags.get_supported())
def test_no_hyphen_tag(self):
"""
Test that no tag contains a hyphen.
"""
import pip.pep425tags
get_config_var = pip.pep425tags.sysconfig.get_config_var
def mock_soabi(var):
if var == 'SOABI':
return 'cpython-35m-darwin'
return get_config_var(var)
with patch('pip.pep425tags.sysconfig.get_config_var', mock_soabi):
supported = pip.pep425tags.get_supported()
for (py, abi, plat) in supported:
assert '-' not in py
assert '-' not in abi
assert '-' not in plat
class TestMoveWheelFiles(object):
"""