Allow version_check to work on local git repo
Same method we use for build.py TrivialFix Change-Id: Ib2a7bbfb8349c473e6fdbacbba239985b05ec0bd
This commit is contained in:
parent
6e9c51898e
commit
76e0c09f34
@ -13,6 +13,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@ -21,6 +22,15 @@ from oslo_config import cfg
|
|||||||
import pkg_resources
|
import pkg_resources
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
PROJECT_ROOT = os.path.abspath(os.path.join(
|
||||||
|
os.path.dirname(os.path.realpath(__file__)), '..'))
|
||||||
|
|
||||||
|
# NOTE(SamYaple): Update the search patch to prefer PROJECT_ROOT as the source
|
||||||
|
# of packages to import if we are using local tools/build.py
|
||||||
|
# instead of pip installed kolla-build tool
|
||||||
|
if PROJECT_ROOT not in sys.path:
|
||||||
|
sys.path.insert(0, PROJECT_ROOT)
|
||||||
|
|
||||||
from kolla.common import config as common_config
|
from kolla.common import config as common_config
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user