summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-05-16 18:14:03 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2011-05-16 18:14:03 +0000
commit674acd025bb1c612286484cfcb7e4f0e3d113232 (patch)
treeab33ba1c0265e87833b38694d4e20e594f176464 /tools
parent1aad930383fa425b88e59929aa1698e31978eb62 (diff)
parent76b0630b77b528a37a37b44d4c456f2c9ebea160 (diff)
downloadnova-674acd025bb1c612286484cfcb7e4f0e3d113232.tar.gz
nova-674acd025bb1c612286484cfcb7e4f0e3d113232.tar.xz
nova-674acd025bb1c612286484cfcb7e4f0e3d113232.zip
Merge with trunk
Diffstat (limited to 'tools')
-rw-r--r--tools/install_venv.py10
-rw-r--r--tools/pip-requires2
2 files changed, 9 insertions, 3 deletions
diff --git a/tools/install_venv.py b/tools/install_venv.py
index 30ec85374..8149a3afa 100644
--- a/tools/install_venv.py
+++ b/tools/install_venv.py
@@ -1,3 +1,4 @@
+
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
@@ -31,11 +32,15 @@ ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
VENV = os.path.join(ROOT, '.nova-venv')
PIP_REQUIRES = os.path.join(ROOT, 'tools', 'pip-requires')
TWISTED_NOVA='http://nova.openstack.org/Twisted-10.0.0Nova.tar.gz'
+PY_VERSION = "python" + str(sys.version_info[0]) + '.' + str(sys.version_info[1])
def die(message, *args):
print >>sys.stderr, message % args
sys.exit(1)
+def check_python_version():
+ if sys.version_info < (2, 6):
+ die("Need Python Version >= 2.6")
def run_command(cmd, redirect_output=True, check_exit_code=True):
"""
@@ -100,12 +105,12 @@ def install_dependencies(venv=VENV):
# Tell the virtual env how to "import nova"
- pthfile = os.path.join(venv, "lib", "python2.6", "site-packages", "nova.pth")
+ pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages", "nova.pth")
f = open(pthfile, 'w')
f.write("%s\n" % ROOT)
# Patch eventlet (see FAQ # 1485)
patchsrc = os.path.join(ROOT, 'tools', 'eventlet-patch')
- patchfile = os.path.join(venv, "lib", "python2.6", "site-packages", "eventlet",
+ patchfile = os.path.join(venv, "lib", PY_VERSION, "site-packages", "eventlet",
"green", "subprocess.py")
patch_cmd = "patch %s %s" % (patchfile, patchsrc)
os.system(patch_cmd)
@@ -134,6 +139,7 @@ def print_help():
def main(argv):
+ check_python_version()
check_dependencies()
create_virtualenv()
install_dependencies()
diff --git a/tools/pip-requires b/tools/pip-requires
index f7eb1703e..8f8018765 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -2,7 +2,7 @@ SQLAlchemy==0.6.3
pep8==0.5.0
pylint==0.19
IPy==0.70
-Cheetah==2.4.2.1
+Cheetah==2.4.4
M2Crypto==0.20.2
amqplib==0.6.1
anyjson==0.2.4