File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import os
2+ import subprocess
3+ import sys
4+ import time
5+
6+
7+ def msbuild (project , python_version ):
8+ base_environ = os .environ
9+ base_environ .update ({'PYTHONHOME' : python_version })
10+ vs = '"C:/Program Files (x86)/MSBuild/14.0/Bin/MSBuild.exe"'
11+ process = subprocess .Popen ('{0} {1} /t:Rebuild /p:Configuration="Development Editor" /p:Platform=Win64' .format (vs , project ), env = base_environ )
12+ while process .poll () is None :
13+ time .sleep (0.5 )
14+ if process .returncode != 0 :
15+ sys .exit (process .returncode )
16+
17+ main_start = time .time ()
18+ sln = sys .argv [1 ]
19+ python_version = sys .argv [2 ]
20+
21+ print ('\n \n ***** building {0} for {1} *****\n \n ' .format (sln , python_version ))
22+ sys .stdout .flush ()
23+ msbuild (sln , python_version )
24+
25+ main_end = time .time ()
26+ print ('build ready after {0} seconds' .format (main_end - main_start ))
You can’t perform that action at this time.
0 commit comments