Commit 0185dc6a authored by Godefroid Chapelle's avatar Godefroid Chapelle

whitespace

parent decdb887
...@@ -111,11 +111,11 @@ def get_supported(versions=None, supplied_platform=None): ...@@ -111,11 +111,11 @@ def get_supported(versions=None, supplied_platform=None):
"""Return a list of supported tags for each version specified in """Return a list of supported tags for each version specified in
`versions`. `versions`.
:param versions: a list of string versions, of the form ["33", "32"], :param versions: a list of string versions, of the form ["33", "32"],
or None. The first version will be assumed to support our ABI. or None. The first version will be assumed to support our ABI.
""" """
supported = [] supported = []
# Versions must be given with respect to the preference # Versions must be given with respect to the preference
if versions is None: if versions is None:
versions = [] versions = []
...@@ -124,15 +124,15 @@ def get_supported(versions=None, supplied_platform=None): ...@@ -124,15 +124,15 @@ def get_supported(versions=None, supplied_platform=None):
# Support all previous minor Python versions. # Support all previous minor Python versions.
for minor in range(version_info[-1], -1, -1): for minor in range(version_info[-1], -1, -1):
versions.append(''.join(map(str, major + (minor,)))) versions.append(''.join(map(str, major + (minor,))))
impl = get_abbr_impl() impl = get_abbr_impl()
abis = [] abis = []
abi = get_abi_tag() abi = get_abi_tag()
if abi: if abi:
abis[0:0] = [abi] abis[0:0] = [abi]
abi3s = set() abi3s = set()
import imp import imp
for suffix in imp.get_suffixes(): for suffix in imp.get_suffixes():
...@@ -147,20 +147,20 @@ def get_supported(versions=None, supplied_platform=None): ...@@ -147,20 +147,20 @@ def get_supported(versions=None, supplied_platform=None):
if supplied_platform: if supplied_platform:
platforms.append(supplied_platform) platforms.append(supplied_platform)
platforms.append(get_platform()) platforms.append(get_platform())
# Current version, current API (built specifically for our Python): # Current version, current API (built specifically for our Python):
for abi in abis: for abi in abis:
for arch in platforms: for arch in platforms:
supported.append(('%s%s' % (impl, versions[0]), abi, arch)) supported.append(('%s%s' % (impl, versions[0]), abi, arch))
# No abi / arch, but requires our implementation: # No abi / arch, but requires our implementation:
for i, version in enumerate(versions): for i, version in enumerate(versions):
supported.append(('%s%s' % (impl, version), 'none', 'any')) supported.append(('%s%s' % (impl, version), 'none', 'any'))
if i == 0: if i == 0:
# Tagged specifically as being cross-version compatible # Tagged specifically as being cross-version compatible
# (with just the major version specified) # (with just the major version specified)
supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any')) supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any'))
# Major Python version + platform; e.g. binaries not using the Python API # Major Python version + platform; e.g. binaries not using the Python API
supported.append(('py%s' % (versions[0][0]), 'none', arch)) supported.append(('py%s' % (versions[0][0]), 'none', arch))
...@@ -169,5 +169,5 @@ def get_supported(versions=None, supplied_platform=None): ...@@ -169,5 +169,5 @@ def get_supported(versions=None, supplied_platform=None):
supported.append(('py%s' % (version,), 'none', 'any')) supported.append(('py%s' % (version,), 'none', 'any'))
if i == 0: if i == 0:
supported.append(('py%s' % (version[0]), 'none', 'any')) supported.append(('py%s' % (version[0]), 'none', 'any'))
return supported return supported
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