in chalice/deploy/packager.py [0:0]
def _is_compatible_wheel_filename(self, expected_abi, filename):
# type: (str, str) -> bool
wheel = filename[:-4]
all_compatibility_tags = self._iter_all_compatibility_tags(wheel)
for implementation, abi, platform in all_compatibility_tags:
# Verify platform is compatible
if not self._is_compatible_platform_tag(expected_abi, platform):
continue
# Verify that the ABI is compatible with lambda. Either none or the
# correct type for the python version cp27mu for py27 and cp36m for
# py36.
if abi == 'none':
return True
prefix_version = implementation[:3]
expected_abis = [expected_abi]
if prefix_version == 'cp3':
# Deploying python 3 function which means we can accept the
# version specific abi, or we can accept the CPython 3 stable
# ABI of 'abi3'.
expected_abis.append('abi3')
if abi in expected_abis:
return True
return False