##// END OF EJS Templates
Backport PR #2546: use 4 Pythons to build 4 Windows installers...
MinRK -
Show More
@@ -23,20 +23,34 b' except ImportError:'
23
23
24 github = '--github' in sys.argv
24 github = '--github' in sys.argv
25
25
26 cmd_t = "{py} setup.py bdist_wininst --plat-name={plat}"
26 cmd_t = "{py} setup.py bdist_wininst"
27
27
28 pypi = '--pypi' in sys.argv
28 pypi = '--pypi' in sys.argv
29 pypi_cmd_t = "python setup.py upload_wininst -f {fname}"
29 pypi_cmd_t = "python setup.py upload_wininst -f {fname}"
30
30
31 for py in ['python', 'python3']:
31 # Windows Python cannot normally cross-compile,
32 # so you must have 4 Pythons to make 4 installers:
33 # http://docs.python.org/2/distutils/builtdist.html#cross-compiling-on-windows
34
35 pythons = {
36 2: {
37 'win32' : r'C:\\Python27\Python.exe',
38 'win-amd64': r'C:\\Python27_64\Python.exe',
39 },
40 3: {
41 'win32' : r'C:\\Python33\Python.exe',
42 'win-amd64': r'C:\\Python33_64\Python.exe',
43 },
44 }
45
46 for v,plat_py in pythons.items():
32 # deliberately mangle the name,
47 # deliberately mangle the name,
33 # so easy_install doesn't find these and do horrible wrong things
48 # so easy_install doesn't find these and do horrible wrong things
34 v = 3 if py.endswith('3') else 2
35 try:
49 try:
36 shutil.rmtree('build')
50 shutil.rmtree('build')
37 except OSError:
51 except OSError:
38 pass
52 pass
39 for plat in ['win32', 'win-amd64']:
53 for plat,py in plat_py.items():
40 cmd = cmd_t.format(**locals())
54 cmd = cmd_t.format(**locals())
41 sh(cmd)
55 sh(cmd)
42 orig = glob.glob(os.path.join('dist', 'ipython-*.{plat}.exe'.format(**locals())))[0]
56 orig = glob.glob(os.path.join('dist', 'ipython-*.{plat}.exe'.format(**locals())))[0]
General Comments 0
You need to be logged in to leave comments. Login now