Procházet zdrojové kódy

Allow a Python version specific ABI tag, like cp35m

Thomas Kluyver před 8 roky
rodič
revize
0a8b799cea
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  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):