Skip to content

Commit 80a35c6

Browse files
author
stonebig
committed
better code style
1 parent 14f62fb commit 80a35c6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

winpython/wppm.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,12 @@ def extract_infos(self):
140140
return
141141
# New : Binary wheel case
142142
elif bname.endswith(('32.whl', '64.whl')):
143-
# {name}-{version}-{python tag}-{abi tag}-{platform tag}.whl
143+
# {name}[-{bloat}]-{version}-{python tag}-{abi tag}-{platform tag}.whl
144144
# ['sounddevice','0.3.5','py2.py3.cp34.cp35','none','win32']
145+
# PyQt5-5.7.1-5.7.1-cp34.cp35.cp36-none-win_amd64.whl
145146
bname2 = bname[:-4].split("-")
146-
try: # normal case: pep8-1.7.0-py2.py3-none-any.whl
147-
self.name, self.version, self.pywheel, abi, arch = bname2
148-
except: # PyQt5-5.7.1-5.7.1-cp34.cp35.cp36-none-win_amd64.whl
149-
self.name, self.version, dumb, self.pywheel, abi, arch = bname2
147+
self.name = bname2[0]
148+
self.version, self.pywheel, abi, arch = bname2[-4:]
150149
self.pyversion = None # Let's ignore this self.pywheel
151150
# wheel arch is 'win32' or 'win_amd64'
152151
self.architecture = 32 if arch == 'win32' else 64

0 commit comments

Comments
 (0)