Daniel Holth committed 8ecf6ae Merge


Comments (0)

Files changed (1)


        the point that when it's not there, any version is implied).
     4. The architecture must be taken from the installer filename, as it is
        not included in the egg-info data.
+    5. Architecture-neutral installers still have an architecture because the
+       installer format itself (being executable) is architecture-specific. We
+       should therefore ignore the architecture if the content is pure-python.
     egginfo = None
     rest2, sep, w_pyver = rest.rpartition('-')
     if sep and w_pyver.startswith('py'):
         rest = rest2
+        w_pyver = w_pyver.replace('.', '')
-        # Should be 'any' but wheel format doesn't support this...
-        w_pyver = 'py9.9' # Dummy to see what happens...
+        # Not version specific - use py2.py3. While it is possible that
+        # pure-Python code is not compatible with both Python 2 and 3, there
+        # is no way of knowing from the wininst format, so we assume the best
+        # here (the user can always manually rename the wheel to be more
+        # restrictive if needed).
+        w_pyver = 'py2.py3'
     # 3. Version and architecture
     w_ver, sep, w_arch = rest.rpartition('.')
     if not sep:
     # egg2wheel
     abi = 'none'
-    pyver = info['pyver'].replace('.', '')
+    pyver = info['pyver']
     arch = (info['arch'] or 'any').replace('.', '_').replace('-', '_')
+    # Wininst installers always have arch even if they are not
+    # architecture-specific (because the format itself is).
+    # So, assume the content is architecture-neutral if root is purelib.
+    if root_is_purelib:
+        arch = 'any'
+    # If the installer is architecture-specific, it's almost certainly also
+    # CPython-specific.
     if arch != 'any':
-        # assume all binary eggs are for CPython
-        pyver = 'cp' + pyver[2:]
+        pyver = pyver.replace('py', 'cp')
     wheel_name = '-'.join((
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.