Open GoogleCodeExporter opened 9 years ago
Ok, it turns out this only happens if the call to distutils is made from inside
a PyQt application. It seems to work fine on windows xp but not on windows 7.
Contrary to my earlier statement, I've now also seen in it python 2.7.6.1.
The issues seems to be with distutils rather than pythonxy, which uses the
deprecated os.popen() command to determine the MinGW version.
If anyone else has this issue, the following monkey patch fixes it:
import platform
if platform.system() == 'Windows':
import subprocess
def _ospop(command, mode='r', bufsize=0):
if mode == 'r':
return subprocess.Popen(command, shell=True, bufsize=bufsize,
stdout=subprocess.PIPE).stdout
else:
return subprocess.Popen(command, shell=True, bufsize=bufsize,
stdin=subprocess.PIPE).stdin
os.popen = _ospop
Original comment by Michael....@gmail.com
on 15 Mar 2015 at 9:44
Original issue reported on code.google.com by
Michael....@gmail.com
on 14 Mar 2015 at 12:24