Hi all
I have some code that uses pip to bootstrap a Python envionment for out build process: this is a lovely way of ensuring we get proper isolation of the build requirements from the rest of the host system, and helping us get more consistent build results overall.
Anyway, the code I have that drives pip.py
appears to have some problems on windows. The problem is that I'm spawning the pip
process from my bootstrapping scripts using subprocess.Popen()
and then waiting for the process to complete but this is happening too early due to the fact that pip
uses execv to relaunch itself under the new virtualenv it creates. When this happens my parent is seeing that the child has exited with an exitcode of 0 and it carries on on it's merry way.
So the question is simple: how can I cope with an os.execv()
call from a child process on win32 in manner where i can ascertain the return code of the newly executed child process?