summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-05-08 05:53:18 +0000
committerGerrit Code Review <review@openstack.org>2013-05-08 05:53:18 +0000
commite523c8c591806454e0e326bbdac57508787f8d24 (patch)
treee7f2a0b46a382b6c2fb9f1edef496817cb6baf57
parent6a4800d8cc36812835dca796895bafec940b2ce5 (diff)
parent3c132c028a089936eb205079ad239347bc1a0dd9 (diff)
downloadoslo-e523c8c591806454e0e326bbdac57508787f8d24.tar.gz
oslo-e523c8c591806454e0e326bbdac57508787f8d24.tar.xz
oslo-e523c8c591806454e0e326bbdac57508787f8d24.zip
Merge "Copy Nova's workaround for RHEL6 eventlet issue"
-rw-r--r--MAINTAINERS7
-rw-r--r--contrib/redhat-eventlet.patch16
-rw-r--r--tools/patch_tox_venv.py38
-rw-r--r--tox.ini4
-rw-r--r--update.py7
5 files changed, 68 insertions, 4 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 83822b1..aaeaa07 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -205,6 +205,13 @@ M: Michael Still <mikal@stillhq.com>
S: Maintained
F: processutils.py
+== redhat-eventlet.patch ==
+
+M: Mark McLoughlin <markmc@redhat.com>
+S: Maintained
+F: contrib/redhat-eventlet.patch
+F: tools/patch_tox_venv.py
+
== rootwrap ==
M: Thierry Carrez <thierry@openstack.org>
diff --git a/contrib/redhat-eventlet.patch b/contrib/redhat-eventlet.patch
new file mode 100644
index 0000000..cf2ff53
--- /dev/null
+++ b/contrib/redhat-eventlet.patch
@@ -0,0 +1,16 @@
+--- .nova-venv/lib/python2.6/site-packages/eventlet/green/subprocess.py.orig
+2011-05-25
+23:31:34.597271402 +0000
++++ .nova-venv/lib/python2.6/site-packages/eventlet/green/subprocess.py
+2011-05-25
+23:33:24.055602468 +0000
+@@ -32,7 +32,7 @@
+ setattr(self, attr, wrapped_pipe)
+ __init__.__doc__ = subprocess_orig.Popen.__init__.__doc__
+
+- def wait(self, check_interval=0.01):
++ def wait(self, check_interval=0.01, timeout=None):
+ # Instead of a blocking OS call, this version of wait() uses logic
+ # borrowed from the eventlet 0.2 processes.Process.wait() method.
+ try:
+
diff --git a/tools/patch_tox_venv.py b/tools/patch_tox_venv.py
new file mode 100644
index 0000000..e23cf74
--- /dev/null
+++ b/tools/patch_tox_venv.py
@@ -0,0 +1,38 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import os
+import sys
+
+import install_venv_common as install_venv
+
+
+def main(argv):
+ root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+
+ venv = os.environ['VIRTUAL_ENV']
+
+ pip_requires = os.path.join(root, 'tools', 'pip-requires')
+ test_requires = os.path.join(root, 'tools', 'test-requires')
+ py_version = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
+ project = 'oslo'
+ install = install_venv.InstallVenv(root, venv, pip_requires, test_requires,
+ py_version, project)
+ #NOTE(dprince): For Tox we only run post_process (which patches files, etc)
+ install.post_process()
+
+if __name__ == '__main__':
+ main(sys.argv)
diff --git a/tox.ini b/tox.ini
index 687cf4a..cf9e11f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,7 +11,9 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_OPENSTACK_STDOUT=1
deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
-commands = nosetests --with-doctest --exclude-dir=tests/testmods {posargs}
+commands =
+ python tools/patch_tox_venv.py
+ nosetests --with-doctest --exclude-dir=tests/testmods {posargs}
[flake8]
show-source = True
diff --git a/update.py b/update.py
index f6ffd7c..36ee3f2 100644
--- a/update.py
+++ b/update.py
@@ -173,8 +173,7 @@ def _copy_pyfile(path, base, dest_dir):
def _copy_module(mod, base, dest_dir):
- print(("Copying openstack.common.%s under the %s module in %s" %
- (mod, base, dest_dir)))
+ print("Copying %s under the %s module in %s" % (mod, base, dest_dir))
copy_pyfile = functools.partial(_copy_pyfile,
base=base, dest_dir=dest_dir)
@@ -183,7 +182,8 @@ def _copy_module(mod, base, dest_dir):
path = _mod_to_path('openstack.common')
for d in mod.split('.')[:-1]:
path = os.path.join(path, d)
- copy_pyfile(os.path.join(path, '__init__.py'))
+ if os.path.isdir(path):
+ copy_pyfile(os.path.join(path, '__init__.py'))
mod_path = _mod_to_path('openstack.common.%s' % mod)
mod_file = '%s.py' % mod_path
@@ -200,6 +200,7 @@ def _copy_module(mod, base, dest_dir):
globs_to_copy = [
os.path.join('tools', mod + '*'),
os.path.join('etc', 'oslo', mod + '*.conf'),
+ os.path.join('contrib', mod + '*'),
]
for matches in [glob.glob(g) for g in globs_to_copy]: