##// END OF EJS Templates
Switch master to development of 6.0...
Switch master to development of 6.0 I'm thinking about this because we've just released 5.1, but I'm happy for it to wait a bit longer if we prefer. As planned, 6.0 will require Python 3, while we will continue to support 5.x for some time for Python 2 users. Before merging this, we should send a message to the mailing list for any Python 2 users following master, and make a 5.x branch off master.

File last commit:

r22791:49a2b8e7
r22795:3074aa87
Show More
toollib.py
57 lines | 1.5 KiB | text/x-python | PythonLexer
"""Various utilities common to IPython release and maintenance tools.
"""
from __future__ import print_function
# Library imports
import os
# Useful shorthands
pjoin = os.path.join
cd = os.chdir
# Constants
# SSH root address of the archive site
archive_user = 'ipython@archive.ipython.org'
archive_dir = 'archive.ipython.org'
archive = '%s:%s' % (archive_user, archive_dir)
# Build commands
# Source dists
sdists = './setup.py sdist --formats=gztar,zip'
# Binary dists
def buildwheels():
for py in ('2', '3'):
sh('python%s setupegg.py bdist_wheel' % py)
# Utility functions
def sh(cmd):
"""Run system command in shell, raise SystemExit if it returns an error."""
print("$", cmd)
stat = os.system(cmd)
#stat = 0 # Uncomment this and comment previous to run in debug mode
if stat:
raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
# Backwards compatibility
c = sh
def get_ipdir():
"""Get IPython directory from command line, or assume it's the one above."""
# Initialize arguments and check location
ipdir = pjoin(os.path.dirname(__file__), os.pardir)
ipdir = os.path.abspath(ipdir)
cd(ipdir)
if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
raise SystemExit('Invalid ipython directory: %s' % ipdir)
return ipdir
try:
execfile = execfile
except NameError:
def execfile(fname, globs, locs=None):
locs = locs or globs
exec(compile(open(fname).read(), fname, "exec"), globs, locs)