forked from python-greenlet/greenlet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake-win-release
executable file
·41 lines (32 loc) · 1007 Bytes
/
make-win-release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /usr/bin/env python
import sys, os, subprocess
executables = ["C:\\Python%s\\python.exe" % x for x in "24 25 26 27 30 31 32".split()]
def system(cmd):
sys.stdout.write("====> Running %s\n" % cmd)
popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
nl = True
while 1:
char = popen.stdout.read(1)
if not char:
break
if nl:
sys.stdout.write(" ")
sys.stdout.write(char)
sys.stdout.flush()
nl = char == "\n"
st = popen.wait()
if st != 0:
sys.exit("Error: command %r failed" % cmd)
sys.stdout.write("\n")
def main():
upload = ""
if sys.argv[1:] == ["upload"]:
upload = "upload"
for x in executables:
if not os.path.exists(x):
continue
for dist in ["bdist_egg", "bdist_wininst"]:
cmd = "%s setup.py -q %s %s" % (x, dist, upload)
system(cmd)
if __name__ == "__main__":
main()