From d409f50062a7a72233e00cfe0466228034f8fb31 Mon Sep 17 00:00:00 2001 From: Mark Gray Date: Thu, 19 Nov 2020 03:44:34 -0500 Subject: 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 Signed-off-by: Ilya Maximets --- python/setup.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'python/setup.py') 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) -- cgit v1.2.1