3 import re
, os
, sys
, json
, subprocess
;
5 pyexecpath
= os
.path
.realpath(sys
.executable
);
6 pkgsetuppy
= os
.path
.realpath("."+os
.path
.sep
+"setup.py");
7 pypkgenlistp
= subprocess
.Popen([pyexecpath
, pkgsetuppy
, "getversioninfo"], stdout
=subprocess
.PIPE
, stderr
=subprocess
.PIPE
);
8 pypkgenout
, pypkgenerr
= pypkgenlistp
.communicate();
9 if(sys
.version
[0]=="3"):
10 pypkgenout
= pypkgenout
.decode('utf-8');
11 pyconfiginfo
= json
.loads(pypkgenout
);