~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 03:46:05 UTC
  • Revision ID: matt.giuca@gmail.com-20090422034605-eirkdfz2g1dkl1xr
setup/install.py: Now compute python site-packages path using
    distutils.sysconfig.get_python_lib instead of doing it by hand.
    (More reliable as there is OS and distribution-specific code in there to
    calculate the path for us).

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
26
27
 
27
28
from setup import util
28
29
 
29
 
PYTHON_VERSION = sys.version[:3]
30
 
 
31
30
def install(args):
32
31
    usage = """usage: %prog install [options]
33
32
(Requires root)
72
71
 
73
72
    # Calculate python_site_packages using the supplied prefix
74
73
    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)
 
74
        options.python_site_packages = distutils.sysconfig.get_python_lib(
 
75
            prefix=options.prefix)
77
76
 
78
77
    # Call the real function
79
78
    return __install(prefix=options.prefix,