summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbin/ryu-manager6
-rwxr-xr-xrun_tests.sh2
-rw-r--r--ryu/contrib/__init__.py11
3 files changed, 18 insertions, 1 deletions
diff --git a/bin/ryu-manager b/bin/ryu-manager
index 4d6c4908..002cc590 100755
--- a/bin/ryu-manager
+++ b/bin/ryu-manager
@@ -33,6 +33,12 @@ from ryu.app import wsgi
from ryu.base.app_manager import AppManager
from ryu.controller import controller
+# TODO:
+# Right now, we have our own patched copy of ovs python bindings
+# Once our modification is upstreamed and widely deployed,
+# use it
+import ryu.contrib
+
FLAGS = gflags.FLAGS
gflags.DEFINE_bool('version', False, 'output version information and exit')
diff --git a/run_tests.sh b/run_tests.sh
index 2ca8e45a..a00d2a88 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -99,7 +99,7 @@ function run_pylint {
function run_pep8 {
echo "Running pep8 ..."
- PEP8_EXCLUDE="vcsversion.py,*.pyc"
+ PEP8_EXCLUDE="vcsversion.py,*.pyc,contrib"
PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --repeat --show-source"
PEP8_INCLUDE="bin/* ryu setup*.py"
PEP8_LOG=pep8.log
diff --git a/ryu/contrib/__init__.py b/ryu/contrib/__init__.py
new file mode 100644
index 00000000..dbceb1f9
--- /dev/null
+++ b/ryu/contrib/__init__.py
@@ -0,0 +1,11 @@
+# Ajust module loading path for third party library
+import os
+import sys
+
+for path in __path__:
+ if path in sys.path:
+ sys.path.remove(path)
+ path = os.path.abspath(path)
+ if path in sys.path:
+ sys.path.remove(path)
+ sys.path.insert(0, path) # prioritize our own copy than system's