1. Daniel Holth
  2. cpython-packaging

Commits

Daniel Holth  committed 91c47f3 Draft

include SOABI tag in wheel

  • Participants
  • Parent commits 47726e9
  • Branches default

Comments (0)

Files changed (1)

File Lib/packaging/command/bdist_wheel.py

View file
 
     def get_archive_basename(self):
         """Return archive name without extension"""
-        has_ext_modules = self.distribution.has_ext_modules()
+        has_ext_modules = not self.distribution.is_pure()
         if not has_ext_modules:
             plat_name = 'noarch'
             impl_name = 'py'
+            abi_tag = sysconfig.get_config_var("py_version_nodot")
         else:
             plat_name = self.plat_name.replace('-', '_').replace('.', '_')
             impl_name = self.get_abbr_impl()
-        nodot = sysconfig.get_config_var("py_version_nodot")
+            abi_tag = sysconfig.get_config_var('SOABI').rsplit('-', 1)[-1]
         archive_basename = "%s-%s-%s" % (
                 self.distribution.get_fullname(),
-                impl_name + nodot,
+                impl_name + abi_tag,
                 plat_name)
         return archive_basename
 
         msg = Message()
         msg['Wheel-Version'] = '0.1'
         msg['Packager'] = 'packaging'
-        msg['Root-Is-Purelib'] = str(self.root_is_purelib).lower()                
+        msg['Root-Is-Purelib'] = str(self.root_is_purelib).lower()
         wheelfile_path = os.path.join(wheelfile_base, 'WHEEL')
         logger.info('creating %s', wheelfile_path)
         with open(wheelfile_path, 'w', encoding='utf-8') as f:
-            f.write(msg.as_string())        
+            f.write(msg.as_string())
                 
     def fixup_data_files(self):
         """Put all resources in a .data directory"""