From d7598e96ba5bd0bb53635a62b61df077280967cc Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 18 Apr 2016 15:17:08 +1000 Subject: [PATCH] Fix script to include repos in PYTHONPATH The repos checkout needs to be in the PYTHONPATH for the import of the xstatic module to work. Since we invoke the xstatic_check_version.py by absolute path, Python does not include the cwd() in the PYTHONPATH. Change-Id: Idd4f8db6334c9f29168e3bc39de3ed95a4e1c60f --- jenkins/scripts/xstatic_check_version.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jenkins/scripts/xstatic_check_version.py b/jenkins/scripts/xstatic_check_version.py index a37895a31f..4112576aed 100755 --- a/jenkins/scripts/xstatic_check_version.py +++ b/jenkins/scripts/xstatic_check_version.py @@ -18,6 +18,10 @@ import sys from setuptools_scm import get_version +# add the xstatic repos checkout to the PYTHONPATH so we can +# import its contents +sys.path.append(os.getcwd()) + xs = None for name in os.listdir('xstatic/pkg'): if os.path.isdir('xstatic/pkg/' + name):