~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:42:31 UTC
  • Revision ID: matt.giuca@gmail.com-20090422024231-v6v0lrezt37avrxu
setup/install.py: Now uses --prefix to compute the Python site packages path.

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='/usr/local/lib/python%s/site-packages' % PYTHON_VERSION)
 
60
        default=None)
61
61
    (options, args) = parser.parse_args(args)
62
62
 
63
63
    # Prefix must be absolute (not really necessary, but since a relative
70
70
    want a path relative to the working directory)."""
71
71
        return 1
72
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
 
73
78
    # Call the real function
74
79
    return __install(prefix=options.prefix,
75
80
                     python_site_packages=options.python_site_packages,