~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to setup/install.py

  • Committer: William Grant
  • Date: 2009-04-07 04:19:42 UTC
  • Revision ID: grantw@unimelb.edu.au-20090407041942-74fxc3ab98hj7g9l
Treat a NULL exercise.include the same as an empty one. Don't crash.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    parser.add_option("--python-site-packages",
58
58
        action="store", dest="python_site_packages",
59
59
        help="Path to Python site packages directory.",
60
 
        default=None)
 
60
        default='/usr/local/lib/python%s/site-packages' % PYTHON_VERSION)
61
61
    (options, args) = parser.parse_args(args)
62
62
 
63
 
    # Prefix must be absolute (not really necessary, but since a relative
64
 
    # prefix will be taken relative to *root* not working directory, it is
65
 
    # confusing if we allow it).
66
 
    print options.prefix[:1]
67
 
    if options.prefix[:1] not in (os.path.sep, os.path.altsep):
68
 
        print >>sys.stderr, """prefix must be an absolute path.
69
 
    (This will be interpreted relative to root, so provide --root=. if you
70
 
    want a path relative to the working directory)."""
71
 
        return 1
72
 
 
73
 
    # Calculate python_site_packages using the supplied prefix
74
 
    if options.python_site_packages is None:
75
 
        options.python_site_packages = os.path.join(options.prefix,
76
 
            'lib/python%s/site-packages' % PYTHON_VERSION)
77
 
 
78
63
    # Call the real function
79
64
    return __install(prefix=options.prefix,
80
65
                     python_site_packages=options.python_site_packages,