tools: fix package version in arm pack manager

Use python's LooseVersion to get the correct version.
pull/3931/head
Russ Butler 2017-03-07 17:52:42 -06:00
parent 44bc754be5
commit fa38fbb7b3
1 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ from json import dump, load
from zipfile import ZipFile
from tempfile import gettempdir
import warnings
from distutils.version import LooseVersion
warnings.filterwarnings("ignore")
@ -31,7 +32,7 @@ def strip_protocol(url) :
def largest_version(content) :
return sorted([t['version'] for t in content.package.releases('release')],
reverse=True, key=lambda v: map(int, v.split(".")))[0]
reverse=True, key=lambda v: LooseVersion(v))[0]
def do_queue(Class, function, interable) :
q = Queue()