Changeset 17842


Ignore:
Timestamp:
05/13/14 08:01:26 (11 years ago)
Author:
dneise
Message:
got rid of ugly loading libz
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/new_pyfact/pyfact.py

    r17809 r17842  
    1212########## BUILDING OF THE SHARED OBJECT FILES ###############################
    1313if __name__ == '__main__' and len(sys.argv) > 1 and 'build' in sys.argv[1]:
    14     hostname = ROOT.gSystem.HostName()
    15     libz_path_dict = {
    16         # hostname  :   /path/to/libz.so
    17         'isdc'          : "/usr/lib64/libz.so",
    18         'neiseLenovo'   : "/usr/lib/libz.so",
    19         'factcontrol'   : "/usr/lib/libz.so",
    20         "max-K50AB"     : "/usr/lib/x86_64-linux-gnu/libz.so",
    21         "watz"          : "/usr/lib/x86_64-linux-gnu/libz.so",
    22         "grolsch"       : "/usr/lib/i386-linux-gnu/libz.so",
    23     }
    24     libz_loaded = False
    25     for my_hostname in libz_path_dict:
    26         if my_hostname in hostname:
    27             ROOT.gSystem.Load(libz_path_dict[my_hostname])
    28             libz_loaded = True
    29     if not libz_loaded:
    30         print """Warning - Warning - Warning - Warning - Warning - Warning - Warning
    31         I most probably need to load libz.so but I don't know where it is.
    32        
    33         Please edit pyfact.py around line 16-24 and insert your hostname and your
    34         path to your libz.so
    35         Sorry for the inconvenience.
    36         """
    37         sys.exit(-1)
    38 
    39        
     14    ROOT.gSystem.AddLinkedLibs("-lz")
    4015    root_make_string = ROOT.gSystem.GetMakeSharedLib()
    4116    if not "-std=c++0x" in root_make_string:
Note: See TracChangeset for help on using the changeset viewer.