Fix ImportError in build.py (#6231)

There is a possible ImportError where build.py can import the wrong 'util' package if there are others present in `sys.path` already
This commit is contained in:
Michael Goin 2020-12-30 17:22:55 -05:00 committed by GitHub
parent df7e2f3c1e
commit bbb6b416f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ from distutils.version import LooseVersion
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
REPO_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, "..", ".."))
sys.path.append(os.path.join(REPO_DIR, "tools", "python"))
sys.path.insert(0, os.path.join(REPO_DIR, "tools", "python"))
from util import run # noqa: E402