If there are multiple wheels that match, load the latest one.
This should allow users to upgrade the addon by overwriting an older version, instead of requiring a remove-and-install sequence.
This commit is contained in:
parent
822c8daf07
commit
586905a183
@ -31,7 +31,9 @@ def load_wheel(module_name, fname_prefix):
|
|||||||
if not wheels:
|
if not wheels:
|
||||||
raise RuntimeError('Unable to find wheel at %r' % path_pattern)
|
raise RuntimeError('Unable to find wheel at %r' % path_pattern)
|
||||||
|
|
||||||
sys.path.append(wheels[0])
|
# If there are multiple wheels that match, load the latest one.
|
||||||
|
wheels.sort()
|
||||||
|
sys.path.append(wheels[-1])
|
||||||
module = __import__(module_name)
|
module = __import__(module_name)
|
||||||
log.debug('Loaded %s from %s', module_name, module.__file__)
|
log.debug('Loaded %s from %s', module_name, module.__file__)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user