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

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: mattgiuca
  • Date: 2008-01-29 00:21:09 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:317
doc/dependencies: Added dependency on matplotlib.
setup.py: Because we might be installing on older versions of Python,
    it isn't good to hard code "python2.5" everywhere.
    So it now reads from sys.version and uses that to identify the python
    directory (is there a better way?)

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
import conf
75
75
import common.makeuser
76
76
 
 
77
# Determine which Python version (2.4 or 2.5, for example) we are running,
 
78
# and use that as the filename to the Python directory.
 
79
# Just get the first 3 characters of sys.version.
 
80
PYTHON_VERSION = sys.version[0:3]
 
81
 
77
82
# Operating system files to copy over into the jail.
78
83
# These will be copied from the given place on the OS file system into the
79
84
# same place within the jail.
94
99
    '/bin/ls',
95
100
    '/bin/echo',
96
101
    # Needed by python
97
 
    '/usr/bin/python2.5',
 
102
    '/usr/bin/python%s' % PYTHON_VERSION,
98
103
    # Needed by matplotlib
99
104
    '/usr/lib/i686/cmov/libssl.so.0.9.8',
100
105
    '/usr/lib/i686/cmov/libcrypto.so.0.9.8',
118
123
]
119
124
# Symlinks to make within the jail. Src mapped to dst.
120
125
JAIL_LINKS = {
121
 
    'python2.5': 'jail/usr/bin/python',
 
126
    'python%s' % PYTHON_VERSION: 'jail/usr/bin/python',
122
127
}
123
128
# Trees to copy. Src mapped to dst (these will be passed to action_copytree).
124
129
JAIL_COPYTREES = {
125
 
    '/usr/lib/python2.5': 'jail/usr/lib/python2.5',
 
130
    '/usr/lib/python%s' % PYTHON_VERSION:
 
131
        'jail/usr/lib/python%s' % PYTHON_VERSION,
126
132
    '/usr/share/matplotlib': 'jail/usr/share/matplotlib',
127
133
    '/etc/ld.so.conf.d': 'jail/etc/ld.so.conf.d',
128
134
}
657
663
    # Append IVLE path to ivle.pth in python site packages
658
664
    # (Unless it's already there)
659
665
    ivle_pth = os.path.join(sys.prefix,
660
 
        "lib/python2.5/site-packages/ivle.pth")
 
666
        "lib/python%s/site-packages/ivle.pth" % PYTHON_VERSION)
661
667
    ivle_www = os.path.join(ivle_install_dir, "www")
662
668
    write_ivle_pth = True
663
669
    try: