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

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: mattgiuca
  • Date: 2008-01-20 23:20:38 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:253
setup.py: chmods python-console when building.
    Added a whole lot of new files to copy over into the jail (for matplotlib
    support).

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
    '/lib/tls/i686/cmov/libm.so.6',
85
85
    '/lib/tls/i686/cmov/libpthread.so.0',
86
86
    '/lib/tls/i686/cmov/libutil.so.1',
 
87
    '/etc/ld.so.conf',
 
88
    '/etc/ld.so.cache',
 
89
    # These 2 files do not exist in Ubuntu
 
90
    #'/etc/ld.so.preload',
 
91
    #'/etc/ld.so.nohwcap',
 
92
    # UNIX commands
 
93
    '/usr/bin/strace',
 
94
    '/bin/ls',
 
95
    '/bin/echo',
 
96
    # Needed by python
87
97
    '/usr/bin/python2.5',
 
98
    # Needed by matplotlib
 
99
    '/usr/lib/i686/cmov/libssl.so.0.9.8',
 
100
    '/usr/lib/i686/cmov/libcrypto.so.0.9.8',
 
101
    '/lib/tls/i686/cmov/libnsl.so.1',
 
102
    '/usr/lib/libz.so.1',
 
103
    '/usr/lib/atlas/liblapack.so.3',
 
104
    '/usr/lib/atlas/libblas.so.3',
 
105
    '/usr/lib/libg2c.so.0',
 
106
    '/usr/lib/libstdc++.so.6',
 
107
    '/usr/lib/libfreetype.so.6',
 
108
    '/usr/lib/libpng12.so.0',
 
109
    '/usr/lib/libBLT.2.4.so.8.4',
 
110
    '/usr/lib/libtk8.4.so.0',
 
111
    '/usr/lib/libtcl8.4.so.0',
 
112
    '/usr/lib/tcl8.4/init.tcl',
 
113
    '/usr/lib/libX11.so.6',
 
114
    '/usr/lib/libXau.so.6',
 
115
    '/usr/lib/libXdmcp.so.6',
 
116
    '/lib/libgcc_s.so.1',
 
117
    '/etc/matplotlibrc',
88
118
]
89
119
# Symlinks to make within the jail. Src mapped to dst.
90
120
JAIL_LINKS = {
93
123
# Trees to copy. Src mapped to dst (these will be passed to action_copytree).
94
124
JAIL_COPYTREES = {
95
125
    '/usr/lib/python2.5': 'jail/usr/lib/python2.5',
 
126
    '/usr/share/matplotlib': 'jail/usr/share/matplotlib',
 
127
    '/etc/ld.so.conf.d': 'jail/etc/ld.so.conf.d',
96
128
}
97
129
 
98
130
# Try importing existing conf, but if we can't just set up defaults
505
537
    # Copy all console and operating system files into the jail
506
538
    action_copylist(install_list.list_console, 'jail/opt/ivle', dry)
507
539
    copy_os_files_jail(dry)
 
540
    # Chmod the python console
 
541
    action_chmod_x('jail/opt/ivle/console/python-console', dry)
 
542
    
508
543
 
509
544
    # Compile .py files into .pyc or .pyo files
510
545
    compileall.compile_dir('www', quiet=True)
741
776
        os.chmod(file, stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
742
777
            | stat.S_ISUID | stat.S_IRUSR | stat.S_IWUSR)
743
778
 
 
779
def action_chmod_x(file, dry):
 
780
    """Chmod +xs a file (sets execute permission)."""
 
781
    print "chmod u+rwx", file
 
782
    if not dry:
 
783
        os.chmod(file, stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR)
 
784
 
744
785
def query_user(default, prompt):
745
786
    """Prompts the user for a string, which is read from a line of stdin.
746
787
    Exits silently if EOF is encountered. Returns the string, with spaces