summaryrefslogtreecommitdiff
path: root/tools/install_venv.py
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2011-11-15 08:43:46 +0000
committerMark McLoughlin <markmc@redhat.com>2011-11-15 08:43:46 +0000
commitb0ad7284aa6e00559efa6e291b69eef1a2a1de33 (patch)
treecbd4342113fd9d314e77c6abd35903d49dd65d0d /tools/install_venv.py
parent06c8064af50a76dd276d472316f78780a170d6dc (diff)
downloadnova-b0ad7284aa6e00559efa6e291b69eef1a2a1de33.tar.gz
install_venv: apply eventlet patch correctly with python 2.7 (#890461)
Looks like the fix for #884915 only works with RHEL6. Make it work correctly on Fedora 16. Change-Id: I8c996f20d49db688fd8e692bcd836dee693d362a
Diffstat (limited to 'tools/install_venv.py')
-rw-r--r--tools/install_venv.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/install_venv.py b/tools/install_venv.py
index 166801e829..f1d2ea86c0 100644
--- a/tools/install_venv.py
+++ b/tools/install_venv.py
@@ -110,6 +110,9 @@ class Fedora(Distro):
def yum_install(self, pkg, **kwargs):
run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs)
+ def apply_patch(self, originalfile, patchfile):
+ run_command(['patch', originalfile, patchfile])
+
def install_virtualenv(self):
if self.check_cmd('virtualenv'):
return
@@ -143,9 +146,9 @@ class Fedora(Distro):
self.yum_install('patch')
# Apply the eventlet patch
- run_command(['patch',
- '.nova-venv/lib/python2.6/site-packages/eventlet/green/subprocess.py',
- 'contrib/redhat-eventlet.patch'])
+ self.apply_patch(os.path.join(VENV, 'lib', PY_VERSION, 'site-packages',
+ 'eventlet/green/subprocess.py'),
+ 'contrib/redhat-eventlet.patch')
def get_distro():