Show
Ignore:
Timestamp:
07/17/13 22:08:37 (11 years ago)
Author:
jerome
Message:

Removed references to psyco.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/branches/1.26_fixes/checkdeps.py

    r3133 r3570  
    11#! /usr/bin/env python 
    2 # -*- coding: ISO-8859-15 -*- 
     2# -*- coding: utf-8 -*- 
    33# 
    44# PyKota 
     
    1616# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1717# GNU General Public License for more details. 
    18 #  
     18# 
    1919# You should have received a copy of the GNU General Public License 
    2020# along with this program; if not, write to the Free Software 
     
    3232    try : 
    3333        exec "import %s" % module 
    34     except ImportError :     
     34    except ImportError : 
    3535        return 0 
    36     else :     
     36    else : 
    3737        return 1 
    38          
     38 
    3939def checkCommand(command) : 
    4040    """Checks if a command is available or not.""" 
     
    4343    input.close() 
    4444    return result 
    45      
     45 
    4646def checkWithPrompt(prompt, module=None, command=None, helper=None) : 
    4747    """Tells the user what will be checked, and asks him what to do if something is absent.""" 
     
    5050    if command is not None : 
    5151        result = checkCommand(command) 
    52     elif module is not None :     
     52    elif module is not None : 
    5353        result = checkModule(module) 
    54     if result :     
     54    if result : 
    5555        sys.stdout.write("OK\n") 
    56     else :     
     56    else : 
    5757        sys.stdout.write("NO.\n") 
    5858        sys.stderr.write("ERROR : %s not available !\n" % prompt) 
    5959        sys.stdout.write("%s\n" % helper) 
    60      
    61 if __name__ == "__main__" :     
     60 
     61if __name__ == "__main__" : 
    6262    print "Checking PyKota dependencies..." 
    63      
     63 
    6464    # checks if Python version is correct, we need >= 2.2 
    6565    if not (sys.version > "2.2") : 
    6666        sys.stderr.write("PyKota needs at least Python v2.2 !\nYour version seems to be older than that, please update.\nAborted !\n") 
    6767        sys.exit(-1) 
    68          
     68 
    6969    # checks if some needed Python modules are there or not. 
    7070    modulestocheck = [ ("Python-PygreSQL", "pg", "PygreSQL is mandatory if you want to use PostgreSQL as the quota database backend.\nSee http://www.pygresql.org"), 
     
    7878                       ("Python-ReportLab", "reportlab.pdfgen.canvas", "Python-ReportLab is required if you plan to have PyKota generate banners.\nSee http://www.reportlab.org/"), 
    7979                       ("Python-Imaging", "PIL.Image", "Python-Imaging is required if you plan to have PyKota generate banners.\nSee http://www.pythonware.com/downloads/"), 
    80                        ("Python-Psyco", "psyco", "Python-Psyco speeds up parsing of print files, you should use it.\nSee http://psyco.sourceforge.net/"), 
    8180                       ("Python-pkpgcounter", "pkpgpdls", "Python-pkpgcounter is mandatory.\nGrab it from http://www.pykota.com/software/pkpgcounter/"), 
    8281                       ("Python-PAM", "PAM", "Python-PAM is recommended if you plan to use pknotify+PyKotIcon.\nGrab it from http://www.pangalactic.org/PyPAM/"), 
     
    8584                     ] 
    8685    commandstocheck = [ ("GhostScript", "gs", "Depending on your configuration, GhostScript may be needed in different parts of PyKota."), 
    87                         ("SNMP Tools", "snmpget", "SNMP Tools are needed if you want to use SNMP enabled printers."),  
     86                        ("SNMP Tools", "snmpget", "SNMP Tools are needed if you want to use SNMP enabled printers."), 
    8887                        ("Netatalk", "pap", "Netatalk is needed if you want to use AppleTalk enabled printers.") 
    8988                      ] 
    9089    for (name, module, helper) in modulestocheck : 
    9190        checkWithPrompt(name, module=module, helper=helper) 
    92              
     91 
    9392    # checks if some software are there or not. 
    9493    for (name, command, helper) in commandstocheck : 
    9594        checkWithPrompt(name, command=command, helper=helper) 
    96              
     95