Merge lp:~maddevelopers/mg5amcnlo/HEPToolsInstallers_rosetta into lp:~maddevelopers/mg5amcnlo/HEPToolsInstallers

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 84
Proposed branch: lp:~maddevelopers/mg5amcnlo/HEPToolsInstallers_rosetta
Merge into: lp:~maddevelopers/mg5amcnlo/HEPToolsInstallers
Diff against target: 65 lines (+32/-2)
1 file modified
HEPToolInstaller.py (+32/-2)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/HEPToolsInstallers_rosetta
Reviewer Review Type Date Requested Status
Valentin Hirschi Pending
Review via email: mp+317683@code.launchpad.net

Description of the change

1) adding the possibility to install Rosetta. [following the MG5aMC_pythia8_interface]
2) ignore the options --source= if defined
This options is passed by mg5 (it is used to select uiuc or ucl cluster) but made the code to crash here. I just avoid the crash.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'HEPToolInstaller.py'
--- HEPToolInstaller.py 2017-02-15 13:01:03 +0000
+++ HEPToolInstaller.py 2017-02-17 21:06:55 +0000
@@ -42,6 +42,15 @@
42 'libraries' : ['libboost_system-mt.%(libextension)s','libboost_system.%(libextension)s'],42 'libraries' : ['libboost_system-mt.%(libextension)s','libboost_system.%(libextension)s'],
43 'include_path' : ['/opt/local/include', '/usr/local/include', '/opt/include', '/usr/include'], 43 'include_path' : ['/opt/local/include', '/usr/local/include', '/opt/include', '/usr/include'],
44 'install_path': '%(prefix)s/boost/'},44 'install_path': '%(prefix)s/boost/'},
45 'rosetta':
46 {'install_mode':'Default',
47 'version': '1.0',
48 'tarball': ['online','TO_BE_DEFINED_BY_INSTALLER'],
49 'mandatory_dependencies': [],
50 'optional_dependencies' : [],
51 'libraries' : [],
52 'include_path' : [],
53 'install_path': '%(prefix)s/rosetta/'},
45 'pythia8':54 'pythia8':
46 {'install_mode':'Default',55 {'install_mode':'Default',
47 'version': '82151',56 'version': '82151',
@@ -240,7 +249,7 @@
240 ['--with_%s'%tool for tool in _HepTools.keys()+_non_installable_dependencies.keys()+249 ['--with_%s'%tool for tool in _HepTools.keys()+_non_installable_dependencies.keys()+
241 _dependency_names_map.keys()]+\250 _dependency_names_map.keys()]+\
242 ['--veto_%s'%tool for tool in _HepTools.keys()+_non_installable_dependencies.keys()]+\251 ['--veto_%s'%tool for tool in _HepTools.keys()+_non_installable_dependencies.keys()]+\
243 ['--logging']252 ['--logging','--source']
244253
245# Recall input command for logfiles254# Recall input command for logfiles
246logger.debug("Installer HEPToolInstaller.py is now processing the following command:")255logger.debug("Installer HEPToolInstaller.py is now processing the following command:")
@@ -574,6 +583,15 @@
574 stderr=mg5amc_py8_interface_log)583 stderr=mg5amc_py8_interface_log)
575 mg5amc_py8_interface_log.close()584 mg5amc_py8_interface_log.close()
576585
586def install_rosetta(tmp_path):
587 """ Installation operations for the rosetta"""
588
589 # Extract the tarball
590 tar = tarfile.open(_HepTools['rosetta']['tarball'][1],)
591 tar.extractall(path=_HepTools['rosetta']['install_path'])
592 tar.close()
593
594
577def install_madanalysis5(tmp_path):595def install_madanalysis5(tmp_path):
578 """ Installation operations for madanalysis5"""596 """ Installation operations for madanalysis5"""
579 597
@@ -918,7 +936,19 @@
918 # Special check for MadAnalysis installation936 # Special check for MadAnalysis installation
919 if target=='madanalysis5':937 if target=='madanalysis5':
920 return 'INSTALLATION STATUS: SUCCESS' in open(pjoin(_HepTools['madanalysis5']['install_path'],'madanalysis5_install.log'),'r').readlines()[-1]938 return 'INSTALLATION STATUS: SUCCESS' in open(pjoin(_HepTools['madanalysis5']['install_path'],'madanalysis5_install.log'),'r').readlines()[-1]
921939 if target=='rosetta':
940 import sys
941 sys.path.append(pjoin(_HepTools[target]['install_path']))
942 try:
943 import Rosetta
944 except:
945 if sys.version_info[1] !=7:
946 logger.warning('Rosetta requires python2.7. Impossible to test the installation but the code is downloaded correctly.')
947 return True
948 else:
949 return False
950 else:
951 return True
922 for f in _HepTools[target]['libraries']:952 for f in _HepTools[target]['libraries']:
923 if any(f.endswith(extension) for extension in _lib_extensions):953 if any(f.endswith(extension) for extension in _lib_extensions):
924 if os.path.exists(pjoin(_HepTools[target]['install_path'],'lib',f)):954 if os.path.exists(pjoin(_HepTools[target]['install_path'],'lib',f)):

Subscribers

People subscribed via source and target branches

to all changes: