summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-09 23:36:41 +0900
committerkali <kali@leap.se>2012-08-09 23:37:21 +0900
commitd2250c4ed065ffedf85f388ef03f58c167d8099a (patch)
tree0eced4dcc6af14f44389f79e5cf235e0c0c77ce7 /setup
parente0f7a63cb36151909176d919282a00fc5a708455 (diff)
fix install virtualenv script
Diffstat (limited to 'setup')
-rw-r--r--setup/install_venv.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/setup/install_venv.py b/setup/install_venv.py
index 6cb3a693..3f3f0575 100644
--- a/setup/install_venv.py
+++ b/setup/install_venv.py
@@ -55,7 +55,8 @@ def run_command_with_code(cmd, redirect_output=True, check_exit_code=True):
stdout = subprocess.PIPE
else:
stdout = None
-
+
+ print 'executing command: %s', cmd
proc = subprocess.Popen(cmd, cwd=ROOT, stdout=stdout)
output = proc.communicate()[0]
if check_exit_code and proc.returncode != 0:
@@ -169,14 +170,14 @@ def create_virtualenv(venv=VENV, no_site_packages=True):
run_command(['virtualenv', '-q', VENV])
print 'done.'
print 'Installing pip in virtualenv...',
- if not run_command(['tools/with_venv.sh', 'easy_install',
+ if not run_command(['setup/tools/with_venv.sh', 'easy_install',
'pip>1.0']).strip():
die("Failed to install pip.")
print 'done.'
def pip_install(*args):
- run_command(['tools/with_venv.sh',
+ run_command(['setup/tools/with_venv.sh',
'pip', 'install', '--upgrade'] + list(args),
redirect_output=False)
@@ -191,9 +192,9 @@ def install_dependencies(venv=VENV):
pip_install('-r', PIP_REQUIRES)
pip_install('-r', TEST_REQUIRES)
- # Tell the virtual env how to "import nova"
+ # "
pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages",
- "novaclient.pth")
+ "leap-client.pth")
f = open(pthfile, 'w')
f.write("%s\n" % ROOT)
@@ -204,12 +205,7 @@ def post_process():
def print_help():
help = """
- python-novaclient development environment setup is complete.
-
- python-novaclient development uses virtualenv to track and manage Python
- dependencies while in development and testing.
-
- To activate the python-novaclient virtualenv for the extent of your current
+ To activate the leap virtualenv for the extent of your current
shell session you can run:
$ source .venv/bin/activate
@@ -217,7 +213,7 @@ def print_help():
Or, if you prefer, you can run commands in the virtualenv on a case by case
basis by running:
- $ tools/with_venv.sh <your command>
+ $ setup/tools/with_venv.sh <your command>
Also, make test will automatically use the virtualenv.
"""