Forráskód Böngészése

Allow a Python version specific ABI tag, like cp35m

Thomas Kluyver 8 éve
szülő
commit
0a8b799cea
1 módosított fájl, 3 hozzáadás és 1 törlés
  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):