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

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: mattgiuca
  • Date: 2008-01-09 02:46:30 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:133
setup.py: Now allows IVLE to be installed over itself, in order to allow
development in the source directory without having to continually
build/install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
Either prompts the administrator for these details or accepts them as
183
183
command-line args. Will be interactive only if there are no arguments given.
184
184
Takes defaults from existing conf file if it exists.
 
185
 
 
186
To run IVLE out of the source directory (allowing development without having
 
187
to rebuild/install), just provide ivle_install_dir as the IVLE trunk
 
188
directory, and run build/install one time.
 
189
 
185
190
Creates www/conf/conf.py and trampoline/conf.h.
 
191
 
186
192
Args are:
187
193
    --root_dir
188
194
    --ivle_install_dir
593
599
            action_mkdir(dstdir, dry)
594
600
        print "cp -f", srcfile, dstfile
595
601
        if not dry:
596
 
            shutil.copyfile(srcfile, dstfile)
 
602
            try:
 
603
                shutil.copyfile(srcfile, dstfile)
 
604
                shutil.copymode(srcfile, dstfile)
 
605
            except shutil.Error:
 
606
                pass
597
607
 
598
608
def action_copyfile(src, dst, dry):
599
609
    """Copies one file to a new location. Creates all parent directories
604
614
        action_mkdir(dstdir, dry)
605
615
    print "cp -f", src, dst
606
616
    if not dry:
607
 
        shutil.copyfile(src, dst)
608
 
        shutil.copymode(src, dst)
 
617
        try:
 
618
            shutil.copyfile(src, dst)
 
619
            shutil.copymode(src, dst)
 
620
        except shutil.Error:
 
621
            pass
609
622
 
610
623
def action_symlink(src, dst, dry):
611
624
    """Creates a symlink in a given location. Creates all parent directories