Changeset 5f67883 in flex_extract.git for Source/Python/install.py
- Timestamp:
- Jun 11, 2020, 12:51:12 PM (4 years ago)
- Branches:
- master, ctbto, dev
- Children:
- f5e40d8
- Parents:
- 026b359
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Source/Python/install.py
r026b359 r5f67883 13 13 # - moved install_args_and_control in here 14 14 # - splitted code in smaller functions 15 # - delete convertbuild files in here instead of compile job script15 # - delete fortran build files in here instead of compile job script 16 16 # - changed static path names to variables from config file 17 17 # - splitted install function into several smaller pieces … … 39 39 # mk_compilejob 40 40 # mk_job_template 41 # del_ convert_build42 # mk_ convert_build41 # del_fortran_build 42 # mk_fortran_build 43 43 # 44 44 #******************************************************************************* … … 243 243 _config.PATH_REL_FORTRAN_SRC)) 244 244 245 # Create Fortran executable - CONVERT2245 # Create Fortran executable 246 246 print('Install ' + _config.FLEXEXTRACT_DIRNAME + ' software at ' + 247 247 c.install_target + ' in directory ' + 248 248 os.path.abspath(c.installdir) + '\n') 249 249 250 del_ convert_build('.')251 mk_ convert_build('.', c.makefile)250 del_fortran_build('.') 251 mk_fortran_build('.', c.makefile) 252 252 253 253 os.chdir(_config.PATH_FLEXEXTRACT_DIR) … … 304 304 c.installdir = _config.PATH_FLEXEXTRACT_DIR 305 305 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 306 321 return 307 322 … … 498 513 makefile : str 499 514 Name of the makefile which should be used to compile FORTRAN 500 CONVERT2program.515 program. 501 516 502 517 ecuid : str … … 633 648 return 634 649 635 def del_ convert_build(src_path):650 def del_fortran_build(src_path): 636 651 '''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) 638 653 639 654 Parameters … … 657 672 return 658 673 659 def mk_ convert_build(src_path, makefile):674 def mk_fortran_build(src_path, makefile): 660 675 '''Compiles the Fortran code and generates the executable. 661 676 … … 686 701 print(perr.decode()) 687 702 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 ' 690 705 '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*')) 693 708 sys.exit('Compilation failed!') 694 709 except ValueError as e: 695 print('ERROR: Makefile call failed:')710 print('ERROR: makefile call failed:') 696 711 print(e) 697 712 else:
Note: See TracChangeset
for help on using the changeset viewer.