77"""
88
99# these imports just forward the symbols into this module's namespace
10- from rez .utils .sourcecode import late
10+ from rez .utils .system import popen
1111from rez .exceptions import InvalidPackageError
1212
1313
@@ -165,7 +165,7 @@ def exec_command(attr, cmd):
165165 """
166166 import subprocess
167167
168- p = subprocess . Popen (cmd , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
168+ p = popen (cmd , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
169169 out , err = p .communicate ()
170170
171171 if p .returncode :
@@ -192,9 +192,8 @@ def exec_python(attr, src, executable="python"):
192192 if isinstance (src , basestring ):
193193 src = [src ]
194194
195- p = subprocess .Popen (
196- [executable , "-c" , "; " .join (src )],
197- stdout = subprocess .PIPE , stderr = subprocess .PIPE )
195+ p = popen ([executable , "-c" , "; " .join (src )],
196+ stdout = subprocess .PIPE , stderr = subprocess .PIPE )
198197 out , err = p .communicate ()
199198
200199 if p .returncode :
@@ -233,8 +232,8 @@ def find_site_python(module_name, paths=None):
233232
234233 py_cmd = 'import {x}; print {x}.__path__' .format (x = module_name )
235234
236- p = subprocess . Popen (["python" , "-c" , py_cmd ], stdout = subprocess .PIPE ,
237- stderr = subprocess .PIPE )
235+ p = popen (["python" , "-c" , py_cmd ], stdout = subprocess .PIPE ,
236+ stderr = subprocess .PIPE )
238237 out , err = p .communicate ()
239238
240239 if p .returncode :
0 commit comments