Changeset 1018 for pykota/trunk/setup.py

Show
Ignore:
Timestamp:
06/06/03 22:49:15 (21 years ago)
Author:
jalet
Message:

Very latest schema. UNTESTED.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/setup.py

    r997 r1018  
    2323# 
    2424# $Log$ 
     25# Revision 1.16  2003/06/06 20:49:15  jalet 
     26# Very latest schema. UNTESTED. 
     27# 
    2528# Revision 1.15  2003/05/17 16:32:30  jalet 
    2629# Also outputs the original import error message. 
     
    111114    return result 
    112115     
    113 def checkWithPrompt(prompt, module=None, command=None, help=None) : 
     116def checkWithPrompt(prompt, module=None, command=None, helper=None) : 
    114117    """Tells the user what will be checked, and asks him what to do if something is absent.""" 
    115118    sys.stdout.write("Checking for %s availability : " % prompt) 
     
    125128        sys.stdout.write("NO.\n") 
    126129        sys.stderr.write("ERROR : %s not available !\n" % prompt) 
    127         if help is not None : 
    128             sys.stdout.write("%s\n" % help) 
     130        if helper is not None : 
     131            sys.stdout.write("%s\n" % helper) 
    129132            sys.stdout.write("You may continue safely if you don't need this functionnality.\n") 
    130133        answer = raw_input("%s is missing. Do you want to continue anyway (y/N) ? " % prompt) 
     
    190193     
    191194    # checks if some needed Python modules are there or not. 
    192     modulestocheck = [("PygreSQL", "pg"), ("mxDateTime", "mx.DateTime")] 
     195    modulestocheck = [ ("PygreSQL", "pg", "PygreSQL is mandatory if you want to use PostgreSQL as the quota storage backend."),                                             
     196                       ("mxDateTime", "mx.DateTime", "eGenix' mxDateTime is mandatory for PyKota to work."),  
     197                       ("Python-LDAP", "ldap", "Python-LDAP is mandatory if you plan to use an LDAP\ndirectory as the quota storage backend.") 
     198                     ] 
    193199    commandstocheck = [("SNMP Tools", "snmpget", "SNMP Tools are needed if you want to use SNMP enabled printers."), ("Netatalk", "pap", "Netatalk is needed if you want to use AppleTalk enabled printers.")] 
    194     for (name, module) in modulestocheck : 
    195         action = checkWithPrompt(name, module=module) 
     200    for (name, module, helper) in modulestocheck : 
     201        action = checkWithPrompt(name, module=module, helper=helper) 
    196202        if action == ACTION_ABORT : 
    197203            sys.stderr.write("Aborted !\n") 
     
    199205             
    200206    # checks if some software are there or not. 
    201     for (name, command, help) in commandstocheck : 
    202         action = checkWithPrompt(name, command=command, help=help) 
     207    for (name, command, helper) in commandstocheck : 
     208        action = checkWithPrompt(name, command=command, helper=helper) 
    203209        if action == ACTION_ABORT : 
    204210            sys.stderr.write("Aborted !\n")