Skip to content

Commit ada241b

Browse files
author
Roberto De Ioris
committed
added build_win64.py script
1 parent 74f8575 commit ada241b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tools/build_win64.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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))

0 commit comments

Comments
 (0)