From 5580e8c69f5a3e4b6c0df236ba073b555d20c8b5 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Wed, 10 Feb 2016 23:46:55 +0100 Subject: [PATCH] Use subprocess32 when possible --- waflib/Utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/waflib/Utils.py b/waflib/Utils.py index 91dbfec6..820e2036 100644 --- a/waflib/Utils.py +++ b/waflib/Utils.py @@ -10,7 +10,15 @@ through Python versions 2.3 to 3.X and across different platforms (win32, linux, """ import os, sys, errno, traceback, inspect, re, shutil, datetime, gc, platform -import subprocess # <- leave this! + +# leave this +if os.name == 'posix' and sys.version_info[0] < 3: + try: + import subprocess32 as subprocess + except ImportError: + import subprocess +else: + import subprocess from collections import deque, defaultdict