diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2017-07-12 17:02:42 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-07-13 10:54:49 -0400 |
commit | f0f0453984192fd1b250785d2088a84733065c28 (patch) | |
tree | aaffa0ce19816af43f5a1ced614bf9b6c255c5e8 /recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch | |
parent | 165ffabe8933d2e44074d67921ea465eab4d90cb (diff) | |
download | meta-virtualization-f0f0453984192fd1b250785d2088a84733065c28.tar.gz |
openvswitch: backport py3 fixups
While attempting to get ovs to be built and run with py3 (completely
free of py2) host contamination was found (builds on hosts without
python-six installed would fail). It was also determined that pyc
files were still being generated with py2 and not py3. This resulted
in more work being done to achieve the desired results. This work was
sent upstream and subsequently merged. Unfortunately this didn't make
v2.7.1 and may not be available until the next major release, so here
we backport these commits and adjust the recipe to get a clean py3
only build.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch')
-rw-r--r-- | recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch b/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch new file mode 100644 index 00000000..a85980ed --- /dev/null +++ b/recipes-networking/openvswitch/openvswitch-git/0003-Python3-compatibility-execfile-to-exec.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 9cbae86be03756df76560c15720756f9ac088144 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wessel <jason.wessel@windriver.com> | ||
3 | Date: Thu, 29 Jun 2017 20:33:23 -0700 | ||
4 | Subject: [PATCH 3/8] Python3 compatibility: execfile to exec | ||
5 | |||
6 | Commit a4d10a7ca937d73873f6f98619d88682e69f5dbe from | ||
7 | https://github.com/openvswitch/ovs.git | ||
8 | |||
9 | Allow compability with python3 and python2 by changing execfile() to | ||
10 | exec(). | ||
11 | |||
12 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
13 | Signed-off-by: Ben Pfaff <blp@ovn.org> | ||
14 | --- | ||
15 | ovsdb/ovsdb-idlc.in | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in | ||
19 | index 8b85f0d..3fa1a0f 100755 | ||
20 | --- a/ovsdb/ovsdb-idlc.in | ||
21 | +++ b/ovsdb/ovsdb-idlc.in | ||
22 | @@ -17,7 +17,7 @@ def parseSchema(filename): | ||
23 | |||
24 | def annotateSchema(schemaFile, annotationFile): | ||
25 | schemaJson = ovs.json.from_file(schemaFile) | ||
26 | - execfile(annotationFile, globals(), {"s": schemaJson}) | ||
27 | + exec(compile(open(annotationFile, "rb").read(), annotationFile, 'exec'), globals(), {"s": schemaJson}) | ||
28 | ovs.json.to_stream(schemaJson, sys.stdout) | ||
29 | sys.stdout.write('\n') | ||
30 | |||
31 | -- | ||
32 | 2.5.0 | ||
33 | |||