##// END OF EJS Templates
don't test js test groups by default...
don't test js test groups by default since they are huge and slow, treat the like parallel (also huge and slow)

File last commit:

r8688:4fa0a2d7
r16470:57693a8c
Show More
release_windows.py
66 lines | 1.8 KiB | text/x-python | PythonLexer
/ tools / release_windows.py
MinRK
add release_windows script...
r7763 """
build [and upload] Windows IPython releases
usage:
python tools/release_windows.py [--github] [--pypi]
Meant to be run on Windows
Requires that you have python and python3 on your PATH
"""
import glob
import os
import shutil
import sys
from toollib import sh
try:
import gh_api
except ImportError:
gh_api = None
github = '--github' in sys.argv
MinRK
use 4 Pythons to build 4 Windows installers...
r8688 cmd_t = "{py} setup.py bdist_wininst"
MinRK
add release_windows script...
r7763
MinRK
enable uploading wininst to PyPI with tools/release_windows.py...
r7792 pypi = '--pypi' in sys.argv
pypi_cmd_t = "python setup.py upload_wininst -f {fname}"
MinRK
add release_windows script...
r7763
MinRK
use 4 Pythons to build 4 Windows installers...
r8688 # Windows Python cannot normally cross-compile,
# so you must have 4 Pythons to make 4 installers:
# http://docs.python.org/2/distutils/builtdist.html#cross-compiling-on-windows
pythons = {
2: {
'win32' : r'C:\\Python27\Python.exe',
'win-amd64': r'C:\\Python27_64\Python.exe',
},
3: {
'win32' : r'C:\\Python33\Python.exe',
'win-amd64': r'C:\\Python33_64\Python.exe',
},
}
for v,plat_py in pythons.items():
MinRK
add release_windows script...
r7763 # deliberately mangle the name,
# so easy_install doesn't find these and do horrible wrong things
try:
shutil.rmtree('build')
except OSError:
pass
MinRK
use 4 Pythons to build 4 Windows installers...
r8688 for plat,py in plat_py.items():
MinRK
add release_windows script...
r7763 cmd = cmd_t.format(**locals())
sh(cmd)
MinRK
update release_windows.py...
r7791 orig = glob.glob(os.path.join('dist', 'ipython-*.{plat}.exe'.format(**locals())))[0]
mangled = orig.replace('.{plat}.exe'.format(**locals()),
'.py{v}-{plat}.exe'.format(**locals())
)
os.rename(orig, mangled)
MinRK
enable uploading wininst to PyPI with tools/release_windows.py...
r7792 if pypi:
sh(pypi_cmd_t.format(fname=mangled))
MinRK
add release_windows script...
r7763 if github and gh_api:
MinRK
update release_windows.py...
r7791 print ("Uploading %s to GitHub" % mangled)
MinRK
add release_windows script...
r7763 desc = "IPython Installer for Python {v}.x on {plat}".format(**locals())
MinRK
update release_windows.py...
r7791 gh_api.post_download('ipython/ipython', mangled, description=desc)