Fix install in the presence of old modules

If older incompatible version of osmopython is already available, it
might be chosen fori mport instead of current version. Fix this by
explicitly prepending the proper version to path.

Change-Id: Icbe2af1e3815406213be29e0c0360432dc9fd6fb
Related: OS#2821
This commit is contained in:
Max 2018-01-15 14:24:15 +01:00
parent c41b751dec
commit 901f5eb259
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import asyncio, random, sys, os
# we have to use this ugly hack to workaroundbrokenrelative imports in py3: # we have to use this ugly hack to workaroundbrokenrelative imports in py3:
# from ..osmopy.osmo_ipa import Ctrl # from ..osmopy.osmo_ipa import Ctrl
# does not work as expected # does not work as expected
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
from osmopy.osmo_ipa import Ctrl from osmopy.osmo_ipa import Ctrl
from osmopy import __version__ from osmopy import __version__