]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove plugin pip-requires.
authorJames E. Blair <james.blair@rackspace.com>
Tue, 20 Dec 2011 00:25:21 +0000 (16:25 -0800)
committerJames E. Blair <james.blair@rackspace.com>
Tue, 20 Dec 2011 00:30:54 +0000 (16:30 -0800)
Fixes bug 906636.

The cisco plugin included ncclient, but does not use it when testing.
The openvswitch plugin included SQLAlchemy which is already required
by quantum itself.

I've also changed the install_venv.py script to only look at
tools/pip-requires, so that it behaves more like the rest of the
OpenStack projects.  In Jenkins that's the only file we look at
to see if we need to rebuild the virtualenv, so it would be best
if the project only hade one pip-requires.

Also added .gitignore to ignore files created during testing.

Change-Id: Ic460452ec89aa8377c975ca63b57563119860e6b

.gitignore [new file with mode: 0644]
quantum/plugins/cisco/pip-requires [deleted file]
quantum/plugins/openvswitch/pip-requires [deleted file]
tools/install_venv.py

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a750e7a
--- /dev/null
@@ -0,0 +1,8 @@
+*.pyc
+*.DS_Store
+build/*
+build-stamp
+run_tests.err.log
+run_tests.log
+tests/
+.quantum-venv/
diff --git a/quantum/plugins/cisco/pip-requires b/quantum/plugins/cisco/pip-requires
deleted file mode 100644 (file)
index dcd1ed5..0000000
+++ /dev/null
@@ -1 +0,0 @@
--e git+https://github.com/CiscoSystems/ncclient.git#egg=ncclient
diff --git a/quantum/plugins/openvswitch/pip-requires b/quantum/plugins/openvswitch/pip-requires
deleted file mode 100644 (file)
index e35201d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-SQLAlchemy
\ No newline at end of file
index 8bb57849aec72b3e46cbd0fef2b2f90550234a11..b9a34c8741ed5eec486bad8c56997c802f79a57c 100644 (file)
@@ -30,20 +30,11 @@ import sys
 
 ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
 VENV = os.path.join(ROOT, '.quantum-venv')
+PIP_REQUIRES = os.path.join(ROOT, 'tools', 'pip-requires')
 PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
 
 VENV_EXISTS = bool(os.path.exists(VENV))
 
-
-# Find all pip-requires in the project
-PIP_REQUIRES = []
-for root, dirs, files in os.walk(os.path.join(ROOT)):
-    for f in files:
-        if f == 'pip-requires':
-            if os.path.isfile(os.path.join(root, f)):
-                PIP_REQUIRES.append(os.path.join(root, f))
-
-
 def die(message, *args):
     print >> sys.stderr, message % args
     sys.exit(1)
@@ -99,15 +90,8 @@ def create_virtualenv(venv=VENV, install_pip=False):
 
 def install_dependencies(venv=VENV):
     print 'Installing dependencies with pip (this can take a while)...'
-
-    # Install greenlet by hand - just listing it in the requires file does not
-    # get it in stalled in the right order
-    # Create an install command with all found PIP_REQUIRES
-    cmd = ['tools/with_venv.sh', 'pip', 'install', '-E', venv]
-    for p in PIP_REQUIRES:
-        cmd.extend(['-r', p])
-
-    run_command(cmd, redirect_output=False)
+    run_command(['tools/with_venv.sh', 'pip', 'install', '-E', venv, '-r',
+                 PIP_REQUIRES], redirect_output=False)
 
     # Tell the virtual env how to "import quantum"
     pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages",