# Copyright (c) 2009-2012 by Enthought, Inc. # All rights reserved. """\ This code is used to bootstrap enstaller (into sys.prefix of the Python running this script). The functionality is implemented in enstaller itself. Install (bootstrap) enstaller: $ python [--hook] custom_tools/boot-enst.py path/to/enstaller...egg """ import sys def install(egg_path, hook=False): sys.path.insert(0, egg_path) from egginst.bootstrap import main if hook: sys.exit(main(hook=True)) else: sys.exit(main()) if __name__ == '__main__': from optparse import OptionParser p = OptionParser(usage="usage: %prog [options] ENSTALLER.EGG", description=__doc__) p.add_option("--hook", action="store_true") opts, args = p.parse_args() if len(args) != 1: p.error("exactly one argument expected, try -h") install(args[0], opts.hook)