mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1234954
- Use LooseVersion for parsing Mercurial version; r=me
StrictVersion is strict about version strings, insisting on whatever convention Python uses. LooseVersion is not as strict but is strict enough for our use cases. DONTBUILD (NPOTB)
This commit is contained in:
parent
b3a8b8578e
commit
4329c55426
@ -10,7 +10,6 @@ import subprocess
|
||||
import sys
|
||||
|
||||
from distutils.version import LooseVersion
|
||||
from distutils.version import StrictVersion
|
||||
|
||||
|
||||
NO_MERCURIAL = '''
|
||||
@ -76,7 +75,7 @@ We recommend the following tools for installing Python:
|
||||
# Upgrade Mercurial older than this.
|
||||
# This should match OLDEST_NON_LEGACY_VERSION from
|
||||
# tools/mercurial/hgsetup/wizard.py.
|
||||
MODERN_MERCURIAL_VERSION = StrictVersion('3.5.2')
|
||||
MODERN_MERCURIAL_VERSION = LooseVersion('3.5.2')
|
||||
|
||||
# Upgrade Python older than this.
|
||||
MODERN_PYTHON_VERSION = LooseVersion('2.7.3')
|
||||
@ -294,7 +293,7 @@ class BaseBootstrapper(object):
|
||||
print('ERROR: Unable to identify Mercurial version.')
|
||||
return True, False, None
|
||||
|
||||
our = StrictVersion(match.group(1))
|
||||
our = LooseVersion(match.group(1))
|
||||
|
||||
return True, our >= MODERN_MERCURIAL_VERSION, our
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user