##// END OF EJS Templates
Strip prompts even if the prompt isn't present on the first line....
Strip prompts even if the prompt isn't present on the first line. Users (including me) often copy and paste examples from just after the first prompt. This checks for prompts in the first two lines of a block, but if they aren't found there, it will ignore prompt-like prefixes in later lines, to minimise interference with multi-line strings etc. Closes gh-3206

File last commit:

r7751:e4342173
r10652:e3df40cf
Show More
build_release
49 lines | 1.4 KiB | text/plain | TextLexer
#!/usr/bin/env python
"""IPython release build script.
"""
import os
from toollib import *
# The windows builds are fairly painful to set up on a posix system via wine,
# so by default we've disabled them and we just build the windows installers
# separately in a true Windows VM.
do_windows = False
# Egg building is also disabled by default. They serve no real purpose in
# python2, and getting a setupegg.py file that has valid python2/3 syntax is a
# pain in the ass. Since the python devs were too stubborn to leave execfile()
# in place in python3, then we just don't build eggs.
do_eggs = False
# Get main ipython dir, this will raise if it doesn't pass some checks
ipdir = get_ipdir()
cd(ipdir)
# Load release info
execfile(pjoin('IPython', 'core', 'release.py'))
# Check that everything compiles
compile_tree()
# Cleanup
for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'),
pjoin('docs', 'source', 'api', 'generated')]:
if os.path.isdir(d):
remove_tree(d)
# Build source and binary distros
sh(sdists)
# Build eggs
if do_eggs:
sh(eggs)
if do_windows:
map(sh, win_builds)
# Change name so retarded Vista runs the installer correctly
sh("rename 's/linux-i686/win32/' dist/*.exe")
sh("rename 's/linux-x86_64/win32/' dist/*.exe")
# exe files aren't really executable under *nix.
sh("chmod -x dist/*.exe")