summaryrefslogtreecommitdiff
path: root/python/setup.py
diff options
context:
space:
mode:
authorMark Gray <mark.d.gray@redhat.com>2020-11-19 03:44:34 -0500
committerIlya Maximets <i.maximets@ovn.org>2020-11-26 12:18:57 +0100
commitd409f50062a7a72233e00cfe0466228034f8fb31 (patch)
tree6478f04d6c5347147212d80a68bed63ef77ea1ab /python/setup.py
parent7bfb1952b9dd4f34fc11706da83e0d7b514420c7 (diff)
downloadopenvswitch-d409f50062a7a72233e00cfe0466228034f8fb31.tar.gz
python: Update build system to ensure dirs.py is created.
Update build system to ensure dirs.py is created when it is a dependency for a build target. Also, update setup.py to check for that dependency. Fixes: 943c4a325045 ("python: set ovs.dirs variables with build system values") Signed-off-by: Mark Gray <mark.d.gray@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'python/setup.py')
-rw-r--r--python/setup.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/setup.py b/python/setup.py
index b7252800c..d385d8372 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -30,6 +30,15 @@ except IOError:
file=sys.stderr)
sys.exit(-1)
+try:
+ # Try to open generated ovs/dirs.py. However, in this case we
+ # don't need to exec()
+ open("ovs/dirs.py")
+except IOError:
+ print("Ensure dirs.py is created by running make python/ovs/dirs.py",
+ file=sys.stderr)
+ sys.exit(-1)
+
ext_errors = (CCompilerError, DistutilsExecError, DistutilsPlatformError)
if sys.platform == 'win32':
ext_errors += (IOError, ValueError)