Admin/mira.py
changeset 50596 e526ac54316d
parent 50595 8bf60e7a6b6c
child 50597 e57ed50f6bf5
equal deleted inserted replaced
50595:8bf60e7a6b6c 50596:e526ac54316d
    18 # build and evaluation tools
    18 # build and evaluation tools
    19 
    19 
    20 def prepare_isabelle_repository(loc_isabelle, loc_dependency_heaps,
    20 def prepare_isabelle_repository(loc_isabelle, loc_dependency_heaps,
    21   usedir_options='', more_settings=''):
    21   usedir_options='', more_settings=''):
    22 
    22 
    23     # prepare components
       
    24     loc_contrib = "/home/isabelle/contrib"
       
    25     if not path.exists(loc_contrib):
       
    26         raise IOError('Bad file: %s' % loc_contrib)
       
    27     subprocess.check_call(['ln', '-s', loc_contrib, '%s/contrib' % loc_isabelle])
       
    28 
       
    29     # patch settings
    23     # patch settings
    30     extra_settings = '''
    24     extra_settings = '''
    31 ISABELLE_HOME_USER="$ISABELLE_HOME/home_user"
    25 ISABELLE_HOME_USER="$ISABELLE_HOME/home_user"
    32 ISABELLE_OUTPUT="$ISABELLE_HOME/heaps"
    26 ISABELLE_OUTPUT="$ISABELLE_HOME/heaps"
    33 ISABELLE_BROWSER_INFO="$ISABELLE_HOME/browser_info"
    27 ISABELLE_BROWSER_INFO="$ISABELLE_HOME/browser_info"
    34 ISABELLE_PATH="$ISABELLE_OUTPUT"
    28 ISABELLE_PATH="$ISABELLE_OUTPUT"
    35 
    29 
    36 Z3_NON_COMMERCIAL="yes"
    30 Z3_NON_COMMERCIAL="yes"
    37 
    31 
    38 init_components "$COMPONENT/contrib" "$ISABELLE_HOME/Admin/components/main"
    32 init_components "/home/isabelle/contrib" "$ISABELLE_HOME/Admin/components/main"
    39 init_components "$COMPONENT/contrib" "$ISABELLE_HOME/Admin/components/optional"
    33 init_components "/home/isabelle/contrib" "$ISABELLE_HOME/Admin/components/optional"
    40 init_components "$COMPONENT/contrib" "$ISABELLE_HOME/Admin/components/nonfree"
    34 init_components "/home/isabelle/contrib" "$ISABELLE_HOME/Admin/components/nonfree"
    41 
    35 
    42 ''' + more_settings
    36 ''' + more_settings
    43 
    37 
    44     writer = open(path.join(loc_isabelle, 'etc', 'settings'), 'a')
    38     writer = open(path.join(loc_isabelle, 'etc', 'settings'), 'a')
    45     writer.write(extra_settings)
    39     writer.write(extra_settings)