Changeset 1018 for pykota/trunk/setup.py
- Timestamp:
- 06/06/03 22:49:15 (21 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/setup.py
r997 r1018 23 23 # 24 24 # $Log$ 25 # Revision 1.16 2003/06/06 20:49:15 jalet 26 # Very latest schema. UNTESTED. 27 # 25 28 # Revision 1.15 2003/05/17 16:32:30 jalet 26 29 # Also outputs the original import error message. … … 111 114 return result 112 115 113 def checkWithPrompt(prompt, module=None, command=None, help =None) :116 def checkWithPrompt(prompt, module=None, command=None, helper=None) : 114 117 """Tells the user what will be checked, and asks him what to do if something is absent.""" 115 118 sys.stdout.write("Checking for %s availability : " % prompt) … … 125 128 sys.stdout.write("NO.\n") 126 129 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) 129 132 sys.stdout.write("You may continue safely if you don't need this functionnality.\n") 130 133 answer = raw_input("%s is missing. Do you want to continue anyway (y/N) ? " % prompt) … … 190 193 191 194 # 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 ] 193 199 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) 196 202 if action == ACTION_ABORT : 197 203 sys.stderr.write("Aborted !\n") … … 199 205 200 206 # 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) 203 209 if action == ACTION_ABORT : 204 210 sys.stderr.write("Aborted !\n")