summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wolf <throughnothing@gmail.com>2011-05-13 16:59:37 +0000
committerTarmac <>2011-05-13 16:59:37 +0000
commitea5187e449fd72b1443d2ac1558c7a2a07e7a39b (patch)
tree7e2064cebe4cf71cc28ea1fa2560129fe02cee6f
parent715d7ae9a3dc3804b0bcea0830ebd0f1322e16fe (diff)
parent1330241020d68f941a56ce1cf93e6523884cccc1 (diff)
downloadnova-ea5187e449fd72b1443d2ac1558c7a2a07e7a39b.tar.gz
nova-ea5187e449fd72b1443d2ac1558c7a2a07e7a39b.tar.xz
nova-ea5187e449fd72b1443d2ac1558c7a2a07e7a39b.zip
I'm assuming that openstack doesnt work with python < 2.6 here (which I read somewhere on the wiki). This patch will check to make sure python >= 2.6 is installed, and also allow it to work with python 2.7 (and greater in the future).
In order for nova to work with python 2.7, it needs Cheetah 2.4.4, which also works fine in python 2.6 (all tests passed with Cheetah 2.4.4 and python 2.6 for me).
-rw-r--r--.mailmap3
-rw-r--r--Authors2
-rw-r--r--tools/install_venv.py10
-rw-r--r--tools/pip-requires2
4 files changed, 12 insertions, 5 deletions
diff --git a/.mailmap b/.mailmap
index 7e031fc7c..3f0238ee9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -29,6 +29,7 @@
<matt.dietz@rackspace.com> <matthewdietz@Matthew-Dietzs-MacBook-Pro.local>
<matt.dietz@rackspace.com> <mdietz@openstack>
<mordred@inaugust.com> <mordred@hudson>
+<naveedm9@gmail.com> <naveed.massjouni@rackspace.com>
<nirmal.ranganathan@rackspace.com> <nirmal.ranganathan@rackspace.coom>
<paul@openstack.org> <paul.voccio@rackspace.com>
<paul@openstack.org> <pvoccio@castor.local>
@@ -36,6 +37,7 @@
<rlane@wikimedia.org> <laner@controller>
<sleepsonthefloor@gmail.com> <root@tonbuntu>
<soren.hansen@rackspace.com> <soren@linux2go.dk>
+<throughnothing@gmail.com> <will.wolf@rackspace.com>
<todd@ansolabs.com> <todd@lapex>
<todd@ansolabs.com> <todd@rubidine.com>
<tushar.vitthal.patil@gmail.com> <tpatil@vertex.co.in>
@@ -44,5 +46,4 @@
<ueno.nachi@lab.ntt.co.jp> <openstack@lab.ntt.co.jp>
<vishvananda@gmail.com> <root@mirror.nasanebula.net>
<vishvananda@gmail.com> <root@ubuntu>
-<naveedm9@gmail.com> <naveed.massjouni@rackspace.com>
<vishvananda@gmail.com> <vishvananda@yahoo.com>
diff --git a/Authors b/Authors
index 8b54240c1..546c9091f 100644
--- a/Authors
+++ b/Authors
@@ -80,7 +80,7 @@ Trey Morris <trey.morris@rackspace.com>
Tushar Patil <tushar.vitthal.patil@gmail.com>
Vasiliy Shlykov <vash@vasiliyshlykov.org>
Vishvananda Ishaya <vishvananda@gmail.com>
-William Wolf <will.wolf@rackspace.com>
+William Wolf <throughnothing@gmail.com>
Yoshiaki Tamura <yoshi@midokura.jp>
Youcef Laribi <Youcef.Laribi@eu.citrix.com>
Yuriy Taraday <yorik.sar@gmail.com>
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