@@ -162,7 +162,7 @@ def _cpython_abis(py_version, warn=False):
162162 # type: (PythonVersion, bool) -> List[str]
163163 py_version = tuple (py_version ) # To allow for version comparison.
164164 abis = []
165- version = "{}{}" . format ( * py_version [:2 ])
165+ version = _version_nodot ( py_version [:2 ])
166166 debug = pymalloc = ucs4 = ""
167167 with_debug = _get_config_var ("Py_DEBUG" , warn )
168168 has_refcount = hasattr (sys , "gettotalrefcount" )
@@ -221,10 +221,7 @@ def cpython_tags(
221221 if not python_version :
222222 python_version = sys .version_info [:2 ]
223223
224- if len (python_version ) < 2 :
225- interpreter = "cp{}" .format (python_version [0 ])
226- else :
227- interpreter = "cp{}{}" .format (* python_version [:2 ])
224+ interpreter = "cp{}" .format (_version_nodot (python_version [:2 ]))
228225
229226 if abis is None :
230227 if len (python_version ) > 1 :
@@ -252,8 +249,8 @@ def cpython_tags(
252249 if _abi3_applies (python_version ):
253250 for minor_version in range (python_version [1 ] - 1 , 1 , - 1 ):
254251 for platform_ in platforms :
255- interpreter = "cp{major}{minor }" .format (
256- major = python_version [0 ], minor = minor_version
252+ interpreter = "cp{version }" .format (
253+ version = _version_nodot (( python_version [0 ], minor_version ))
257254 )
258255 yield Tag (interpreter , "abi3" , platform_ )
259256
@@ -305,11 +302,11 @@ def _py_interpreter_range(py_version):
305302 all previous versions of that major version.
306303 """
307304 if len (py_version ) > 1 :
308- yield "py{major}{minor} " .format (major = py_version [0 ], minor = py_version [ 1 ] )
305+ yield "py{version} " .format (version = _version_nodot ( py_version [: 2 ]) )
309306 yield "py{major}" .format (major = py_version [0 ])
310307 if len (py_version ) > 1 :
311308 for minor in range (py_version [1 ] - 1 , - 1 , - 1 ):
312- yield "py{major}{minor} " .format (major = py_version [0 ], minor = minor )
309+ yield "py{version} " .format (version = _version_nodot (( py_version [0 ], minor )) )
313310
314311
315312def compatible_tags (
@@ -636,8 +633,11 @@ def _have_compatible_manylinux_abi(arch):
636633def _linux_platforms (is_32bit = _32_BIT_INTERPRETER ):
637634 # type: (bool) -> Iterator[str]
638635 linux = _normalize_string (distutils .util .get_platform ())
639- if linux == "linux_x86_64" and is_32bit :
640- linux = "linux_i686"
636+ if is_32bit :
637+ if linux == "linux_x86_64" :
638+ linux = "linux_i686"
639+ elif linux == "linux_aarch64" :
640+ linux = "linux_armv7l"
641641 manylinux_support = []
642642 _ , arch = linux .split ("_" , 1 )
643643 if _have_compatible_manylinux_abi (arch ):
@@ -704,10 +704,19 @@ def interpreter_version(**kwargs):
704704 if version :
705705 version = str (version )
706706 else :
707- version = "" . join ( map ( str , sys .version_info [:2 ]) )
707+ version = _version_nodot ( sys .version_info [:2 ])
708708 return version
709709
710710
711+ def _version_nodot (version ):
712+ # type: (PythonVersion) -> str
713+ if any (v >= 10 for v in version ):
714+ sep = "_"
715+ else :
716+ sep = ""
717+ return sep .join (map (str , version ))
718+
719+
711720def sys_tags (** kwargs ):
712721 # type: (bool) -> Iterator[Tag]
713722 """
0 commit comments