summaryrefslogtreecommitdiff
path: root/support/lib/util.py
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2015-03-15 16:14:49 +0100
committerMichael Schwarz <michi.schwarz@gmail.com>2015-03-15 16:34:59 +0100
commitfb72dca77a4d79fcb1e4b5c2536ae6feacc7381c (patch)
tree7c2b89e53eb0876d416bbe70f54849757941f181 /support/lib/util.py
parente232c40ef7f25f8e73f7d6c07a18dc199a8c029a (diff)
downloadpogojig-fb72dca77a4d79fcb1e4b5c2536ae6feacc7381c.tar.gz
pogojig-fb72dca77a4d79fcb1e4b5c2536ae6feacc7381c.tar.bz2
pogojig-fb72dca77a4d79fcb1e4b5c2536ae6feacc7381c.zip
Fix make jobserver warning.
When running the make file with a number of jobs, the following warning was generated by the make process used to parse the dependency makefile generated by OpenSCAD: make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. With this change, the variables MAKELEVEL and MAKEFLAGS are removed from the environment before starting the child make process.
Diffstat (limited to 'support/lib/util.py')
-rw-r--r--support/lib/util.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/support/lib/util.py b/support/lib/util.py
index 8b65e58..45ecb89 100644
--- a/support/lib/util.py
+++ b/support/lib/util.py
@@ -15,8 +15,17 @@ def TemporaryDirectory():
shutil.rmtree(dir)
-def command(args):
- process = subprocess.Popen(args)
+def command(args, remove_env = None):
+ if remove_env is None:
+ env = None
+ else:
+ env = dict(os.environ)
+
+ for i in remove_env:
+ if i in env:
+ del env[i]
+
+ process = subprocess.Popen(args, env = env)
process.wait()
if process.returncode: