浏览代码

Allow a Python version specific ABI tag, like cp35m

Thomas Kluyver 8 年之前
父节点
当前提交
0a8b799cea
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      nsist/pypi.py

+ 3 - 1
nsist/pypi.py

@@ -37,8 +37,10 @@ class WheelDownloader(object):
         return max(d.get(p, 0) for p in platform.split('.'))
 
     def score_abi(self, abi):
+        py_version_nodot = ''.join(self.py_version.split('.')[:2])
         # Are there other valid options here?
-        d = {'abi3': 2, 'none': 1}
+        d = {'cp%sm' % py_version_nodot: 3,  # Is the m reliable?
+            'abi3': 2, 'none': 1}
         return max(d.get(a, 0) for a in abi.split('.'))
 
     def score_interpreter(self, interpreter):