Changeset 5f67883 in flex_extract.git for Source/Python/install.py


Ignore:
Timestamp:
Jun 11, 2020, 12:51:12 PM (4 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
f5e40d8
Parents:
026b359
Message:

changed makefile defaults; changed template filenames

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Source/Python/install.py

    r026b359 r5f67883  
    1313#        - moved install_args_and_control in here
    1414#        - splitted code in smaller functions
    15 #        - delete convert build files in here instead of compile job script
     15#        - delete fortran build files in here instead of compile job script
    1616#        - changed static path names to variables from config file
    1717#        - splitted install function into several smaller pieces
     
    3939#    mk_compilejob
    4040#    mk_job_template
    41 #    del_convert_build
    42 #    mk_convert_build
     41#    del_fortran_build
     42#    mk_fortran_build
    4343#
    4444#*******************************************************************************
     
    243243                                  _config.PATH_REL_FORTRAN_SRC))
    244244
    245     # Create Fortran executable - CONVERT2
     245    # Create Fortran executable
    246246    print('Install ' +  _config.FLEXEXTRACT_DIRNAME + ' software at ' +
    247247          c.install_target + ' in directory ' +
    248248          os.path.abspath(c.installdir) + '\n')
    249249
    250     del_convert_build('.')
    251     mk_convert_build('.', c.makefile)
     250    del_fortran_build('.')
     251    mk_fortran_build('.', c.makefile)
    252252
    253253    os.chdir(_config.PATH_FLEXEXTRACT_DIR)
     
    304304            c.installdir = _config.PATH_FLEXEXTRACT_DIR
    305305
     306    if not c.makefile:
     307        print('WARNING: no makefile was specified.')
     308        if c.install_target == 'local':
     309            c.makefile = 'makefile_local_gfortran'
     310            print('WARNING: default makefile selected: makefile_local_gfortan')
     311        elif c.install_target == 'ecgate':
     312            c.makefile = 'makefile_ecgate'
     313            print('WARNING: default makefile selected: makefile_ecgate')
     314        elif c.install_target == 'cca' or \
     315             c.install_target == 'ccb':
     316            c.makefile = 'makefile_cray'
     317            print('WARNING: default makefile selected: makefile_cray')
     318        else:
     319            pass
     320       
    306321    return
    307322
     
    498513    makefile : str
    499514        Name of the makefile which should be used to compile FORTRAN
    500         CONVERT2 program.
     515        program.
    501516
    502517    ecuid : str
     
    633648    return
    634649
    635 def del_convert_build(src_path):
     650def del_fortran_build(src_path):
    636651    '''Clean up the Fortran source directory and remove all
    637     build files (e.g. \*.o, \*.mod and CONVERT2)
     652    build files (e.g. \*.o, \*.mod and FORTRAN EXECUTABLE)
    638653
    639654    Parameters
     
    657672    return
    658673
    659 def mk_convert_build(src_path, makefile):
     674def mk_fortran_build(src_path, makefile):
    660675    '''Compiles the Fortran code and generates the executable.
    661676
     
    686701            print(perr.decode())
    687702            print('Please edit ' + makefile +
    688                   ' or try another Makefile in the src directory.')
    689             print('Most likely GRIB_API_INCLUDE_DIR, GRIB_API_LIB '
     703                  ' or try another makefile in the src directory.')
     704            print('Most likely ECCODES_INCLUDE_DIR, ECCODES_LIB '
    690705                  'and EMOSLIB must be adapted.')
    691             print('Available Makefiles:')
    692             print(UioFiles(src_path, 'Makefile*'))
     706            print('Available makefiles:')
     707            print(UioFiles(src_path, 'makefile*'))
    693708            sys.exit('Compilation failed!')
    694709    except ValueError as e:
    695         print('ERROR: Makefile call failed:')
     710        print('ERROR: makefile call failed:')
    696711        print(e)
    697712    else:
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG