Changeset 807 for SHX/trunk


Ignore:
Timestamp:
11/01/12 11:50:03 (8 years ago)
Author:
marcus
Message:
  • setup now creates $HOME/.shx while installing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/bin/setup.py

    r602 r807  
    1414modules = [ 
    1515    "numpy", "scipy", "sqlalchemy", "distutils", "obspy.core", "obspy.arclink", 
    16     "obspy.sh", "obspy.gse2", "obspy.imaging", "obspy.mseed", "obspy.signal" 
     16    "obspy.sh", "obspy.gse2", "obspy.imaging", "obspy.mseed", "obspy.signal", 
     17    "wx" 
    1718] 
    1819 
     
    2122    path = getPath() 
    2223    checkModules() 
     24 
     25    home = os.getenv("HOME", None) 
     26    if home: 
     27        try: 
     28            _p = os.path.join(home, ".shx") 
     29            os.mkdir(_p) 
     30            print "Created private SHX directory: %s" % _p 
     31        except: 
     32            msg = "Error creating private directory: %s/.shx" % home 
     33            quit(msg) 
     34    else: 
     35        msg = ("$HOME environment not defined. SHX will NOT run without it.\n" 
     36               "Please fix and restart installation!") 
     37        quit(msg) 
     38 
    2339    decompress(path) 
    2440    print "SHX command line script at %s" % \ 
     
    7086 
    7187    if not ok: 
    72         quit("Missing basic python modules! Exit.") 
     88        quit("Missing necessary python modules! Exit.") 
    7389 
    7490 
Note: See TracChangeset for help on using the changeset viewer.