From 221a756550a61ee73a05b5b7d88d9c12ef97675b Mon Sep 17 00:00:00 2001 From: William Wolf Date: Mon, 2 May 2011 16:55:54 -0400 Subject: Update tools/pip-requires and tools/install_venv.py for python2.7 support (works in ubuntu 11.04) --- tools/install_venv.py | 12 ++++++++++-- tools/pip-requires | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/install_venv.py b/tools/install_venv.py index 30ec85374..db9b45cfd 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -31,11 +31,18 @@ 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 +107,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 +141,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 2f4136732..013c3ac49 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 -- cgit From f99c5f60d202e84f5defb63e771f60d20cf43df9 Mon Sep 17 00:00:00 2001 From: William Wolf Date: Mon, 2 May 2011 16:58:06 -0400 Subject: got rid of extra whitespace --- tools/install_venv.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/install_venv.py b/tools/install_venv.py index db9b45cfd..03d93ac7d 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -33,7 +33,6 @@ 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) @@ -42,8 +41,6 @@ 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): """ Runs a command in an out-of-process shell, returning the -- cgit From 5bd57d70135e599e068a6b66d402ce6c75c250cc Mon Sep 17 00:00:00 2001 From: William Wolf Date: Wed, 4 May 2011 21:50:54 -0400 Subject: added myself to Authors --- Authors | 1 + 1 file changed, 1 insertion(+) diff --git a/Authors b/Authors index 1cdeeff99..99c07f7cd 100644 --- a/Authors +++ b/Authors @@ -78,6 +78,7 @@ Trey Morris Tushar Patil Vasiliy Shlykov Vishvananda Ishaya +William Wolf Yoshiaki Tamura Youcef Laribi Zhixue Wu -- cgit From 1330241020d68f941a56ce1cf93e6523884cccc1 Mon Sep 17 00:00:00 2001 From: William Wolf Date: Thu, 12 May 2011 09:19:01 -0400 Subject: fixed pep8 spacing issue --- tools/install_venv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/install_venv.py b/tools/install_venv.py index 03d93ac7d..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 @@ -38,7 +39,7 @@ def die(message, *args): sys.exit(1) def check_python_version(): - if sys.version_info < (2,6): + if sys.version_info < (2, 6): die("Need Python Version >= 2.6") def run_command(cmd, redirect_output=True, check_exit_code=True): -- cgit