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

« back to all changes in this revision

Viewing changes to setup/install.py

  • Committer: Matt Giuca
  • Date: 2009-02-24 02:02:03 UTC
  • mto: This revision was merged to the branch mainline in revision 1119.
  • Revision ID: matt.giuca@gmail.com-20090224020203-aqdcjnsj6y7wl32o
Added a new look to the IVLE header bar. Mmmm... Web 2.0.
Added top-level directory image-source, containing SVG and script files for
    generating the images.
ivle/webapp/coremedia/images: Added 'chrome' directory containing the rendered
    images.
Modified ivle/webapp/base/ivle-headings.html and
    ivle/webapp/coremedia/ivle.css to support the new images.
    Note that the H1 and H2 at the top of the page are no longer displayed
    (and their custom styles have been removed). There is a heading image
    instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import os
24
24
import sys
25
25
import functools
26
 
import distutils.sysconfig
27
26
 
28
27
from setup import util
29
28
 
 
29
PYTHON_VERSION = sys.version[:3]
 
30
 
30
31
def install(args):
31
32
    usage = """usage: %prog install [options]
32
33
(Requires root)
56
57
    parser.add_option("--python-site-packages",
57
58
        action="store", dest="python_site_packages",
58
59
        help="Path to Python site packages directory.",
59
 
        default=None)
 
60
        default='/usr/local/lib/python%s/site-packages' % PYTHON_VERSION)
60
61
    (options, args) = parser.parse_args(args)
61
62
 
62
 
    # Prefix must be absolute (not really necessary, but since a relative
63
 
    # prefix will be taken relative to *root* not working directory, it is
64
 
    # confusing if we allow it).
65
 
    if options.prefix[:1] not in (os.path.sep, os.path.altsep):
66
 
        print >>sys.stderr, """prefix must be an absolute path.
67
 
    (This will be interpreted relative to root, so provide --root=. if you
68
 
    want a path relative to the working directory)."""
69
 
        return 1
70
 
 
71
 
    # Calculate python_site_packages using the supplied prefix
72
 
    if options.python_site_packages is None:
73
 
        options.python_site_packages = distutils.sysconfig.get_python_lib(
74
 
            prefix=options.prefix)
75
 
 
76
63
    # Call the real function
77
64
    return __install(prefix=options.prefix,
78
65
                     python_site_packages=options.python_site_packages,