Changes to make pip-based tests work with jenkins.
The git line for the cisco pip-requires was wrong. The venv needs to be installed in the source tree, not in the home directory for self-contained builds. The version of python can't be assumed and must be calculated. Change-Id: I23d381eb273e82796e309483086dc68f27ce6093
This commit is contained in:
parent
187194098f
commit
07a9070808
@ -1 +1 @@
|
||||
http://github.com/CiscoSystems/ncclient.git
|
||||
-e git+https://github.com/CiscoSystems/ncclient.git#egg=ncclient
|
||||
|
@ -29,9 +29,12 @@ import sys
|
||||
|
||||
|
||||
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||
VENV = os.path.expanduser('~/.quantum-venv')
|
||||
VENV = os.path.join(ROOT, '.quantum-venv')
|
||||
PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
|
||||
|
||||
VENV_EXISTS = bool(os.path.exists(VENV))
|
||||
|
||||
|
||||
# Find all pip-requires in the project
|
||||
PIP_REQUIRES = []
|
||||
for root, dirs, files in os.walk(os.path.join(ROOT)):
|
||||
@ -107,7 +110,7 @@ def install_dependencies(venv=VENV):
|
||||
run_command(cmd, redirect_output=False)
|
||||
|
||||
# Tell the virtual env how to "import quantum"
|
||||
pthfile = os.path.join(venv, "lib", "python2.6", "site-packages",
|
||||
pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages",
|
||||
"quantum.pth")
|
||||
f = open(pthfile, 'w')
|
||||
f.write("%s\n" % ROOT)
|
||||
|
@ -17,5 +17,5 @@
|
||||
# under the License.
|
||||
|
||||
TOOLS=`dirname $0`
|
||||
VENV=~/.quantum-venv
|
||||
VENV=$TOOLS/../.quantum-venv
|
||||
source $VENV/bin/activate && $@
|
||||
|
Loading…
Reference in New Issue
Block a user