Changeset 869 for pykota/trunk

Show
Ignore:
Timestamp:
03/26/03 18:48:36 (22 years ago)
Author:
jalet
Message:

First shot at trying to detect the availability of the needed software
during the installation.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/setup.py

    r839 r869  
    1717# 
    1818# $Log$ 
     19# Revision 1.3  2003/03/26 17:48:36  jalet 
     20# First shot at trying to detect the availability of the needed software 
     21# during the installation. 
     22# 
    1923# Revision 1.2  2003/03/09 16:49:04  jalet 
    2024# The installation script installs the man pages too now. 
     
    3438from pykota.version import __version__, __doc__ 
    3539 
     40if "install" in sys.argv : 
     41    sys.stderr.write("PygreSQL availability : ") 
     42    try : 
     43        import pg 
     44    except ImportError :     
     45        sys.stderr.write("No ! Installation aborted.\n") 
     46        sys.exit(-1) 
     47    else :     
     48        del pg 
     49        sys.stderr.write("OK.\n") 
     50        sys.stderr.write("snmpget availability : ") 
     51        result = os.popen("type snmpget") 
     52        snmpget = result.read().strip() 
     53        result.close() 
     54        if not snmpget : 
     55            sys.stderr.write("No ! Installation aborted.\n") 
     56            sys.exit(-1) 
     57        else :     
     58            sys.stderr.write("OK.\n") 
     59             
    3660data_files = [] 
    3761mofiles = glob.glob(os.sep.join(["po", "*", "*.mo"]))