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

« back to all changes in this revision

Viewing changes to setup/install.py

  • Committer: Matt Giuca
  • Date: 2009-04-22 02:40:27 UTC
  • Revision ID: matt.giuca@gmail.com-20090422024027-byq8tfsti1u7wc4r
setup/install.py: Now forces --prefix to be an absolute path, to avoid
    confusion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
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
 
63
73
    # Call the real function
64
74
    return __install(prefix=options.prefix,
65
75
                     python_site_packages=options.python_site_packages,