mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-23 22:13:40 +00:00
Fix create_pygmentize_bundle
If the bdist_wheel release was not first, then it would throw an exception without looking at the other packages. Change-Id: Iac1f94f1401c4a6a8ec8691a558024800b0e7269
This commit is contained in:
parent
b4a80cd365
commit
4bd5a881ff
|
@ -30,13 +30,15 @@ PYGMENTIZE_LAUNCHER = textwrap.dedent('''\
|
|||
print('Querying PyPI for the latest Pygments release...')
|
||||
pypi = xmlrpc.client.ServerProxy('https://pypi.python.org/pypi')
|
||||
latest_version = pypi.package_releases('Pygments')[0]
|
||||
url = None
|
||||
for release in pypi.release_urls('Pygments', latest_version):
|
||||
if (release['packagetype'] == 'bdist_wheel' and
|
||||
release['python_version'].startswith('py2')):
|
||||
url = release['url']
|
||||
md5_digest = release['md5_digest']
|
||||
break
|
||||
else:
|
||||
|
||||
if not url:
|
||||
raise RuntimeError('No suitable package found.')
|
||||
|
||||
print('Retrieving version %s (%s)...' % (latest_version, url))
|
||||
|
|
Loading…
Reference in a new issue