diff options
| author | Brian Lamar <brian.lamar@rackspace.com> | 2011-04-12 10:38:15 -0400 |
|---|---|---|
| committer | Brian Lamar <brian.lamar@rackspace.com> | 2011-04-12 10:38:15 -0400 |
| commit | bb77763d665b113be0793dc1ecbb620dd9c38384 (patch) | |
| tree | c909c0fd7cc1899d7a6ced27cf32a7ca4568c2c2 /tools | |
| parent | 7ef28c854fa386ee1aa64aaa22c3ef026094f40a (diff) | |
| parent | aebcd4abd574b2edb8f2919cb4c2a77617eb97e9 (diff) | |
| download | nova-bb77763d665b113be0793dc1ecbb620dd9c38384.tar.gz nova-bb77763d665b113be0793dc1ecbb620dd9c38384.tar.xz nova-bb77763d665b113be0793dc1ecbb620dd9c38384.zip | |
Merged trunk.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/eventlet-patch | 24 | ||||
| -rw-r--r-- | tools/install_venv.py | 6 |
2 files changed, 30 insertions, 0 deletions
diff --git a/tools/eventlet-patch b/tools/eventlet-patch new file mode 100644 index 000000000..c87c5f279 --- /dev/null +++ b/tools/eventlet-patch @@ -0,0 +1,24 @@ +# HG changeset patch +# User Soren Hansen <soren@linux2go.dk> +# Date 1297678255 -3600 +# Node ID 4c846d555010bb5a91ab4da78dfe596451313742 +# Parent 5b7e9946c79f005c028eb63207cf5eb7bb21d1c3 +Don't attempt to wrap GreenPipes in GreenPipe + +If the os module is monkeypatched, Python's standard subprocess module +will return greenio.GreenPipe instances for Popen objects' stdin, stdout, +and stderr attributes. However, eventlet.green.subprocess tries to wrap +these attributes in another greenio.GreenPipe, which GreenPipe refuses. + +diff -r 5b7e9946c79f -r 4c846d555010 eventlet/green/subprocess.py +--- a/eventlet/green/subprocess.py Sat Feb 05 13:05:05 2011 -0800 ++++ b/eventlet/green/subprocess.py Mon Feb 14 11:10:55 2011 +0100 +@@ -27,7 +27,7 @@ + # eventlet.processes.Process.run() method. + for attr in "stdin", "stdout", "stderr": + pipe = getattr(self, attr) +- if pipe is not None: ++ if pipe is not None and not type(pipe) == greenio.GreenPipe: + wrapped_pipe = greenio.GreenPipe(pipe, pipe.mode, bufsize) + setattr(self, attr, wrapped_pipe) + __init__.__doc__ = subprocess_orig.Popen.__init__.__doc__ diff --git a/tools/install_venv.py b/tools/install_venv.py index 4e3941210..30ec85374 100644 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -103,6 +103,12 @@ def install_dependencies(venv=VENV): pthfile = os.path.join(venv, "lib", "python2.6", "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", + "green", "subprocess.py") + patch_cmd = "patch %s %s" % (patchfile, patchsrc) + os.system(patch_cmd) def print_help(): |
