""" This script checks all the prerequisites for running a particular release version of web2ldap. $Id: checkinst.py,v 1.13 2005/09/23 16:57:39 michael Exp $ """ import sys,os,imp print '*** Checking installation prerequisites for web2ldap ***' exec_startdir = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))) sys.path.insert(0,os.path.join(exec_startdir,'pylib')) print """Make sure to run this script with the same Python interpreter executable you plan to invoke web2ldap with! ***Python interpreter***""" print 'sys.executable',repr(sys.executable) print 'sys.prefix',repr(sys.prefix) print 'sys.exec_prefix',repr(sys.exec_prefix) print 'sys.version',repr(sys.version) if not sys.version.startswith('2.'): print 'At least Python 2.0.0 is required! Detected %s.' % (repr(sys.version)) print 'sys.platform',repr(sys.platform) print 'os.name',repr(os.name) print '*** Installed modules ***' modules = {} missing = [] for modulename,mandantory,url,desc in [ ('w2lapp',1,'http://www.web2ldap.de','Internal web2ldap application module'), ('ldap',1,'http://python-ldap.sf.net','Module package for accessing LDAP servers'), ('ldap.sasl',1,'http://python-ldap.sf.net','Sub-module for SASL support with LDAP'), ('ldap.schema',1,'http://python-ldap.sf.net','Sub-module for LDAP sub schema support'), ('ldap.async',1,'http://python-ldap.sf.net','Sub-module for LDAP async searches'), ('ldapurl',1,'http://python-ldap.sf.net','LDAP URL support'), ('ldif',1,'http://python-ldap.sf.net','LDIF support'), ('xml.sax',1,'http://www.python.org',"Python's built-in XML support"), ('xml.sax.handler',1,'http://www.python.org',"Python's built-in XML support"), ('dsml',1,'http://python-ldap.sf.net','DSMLv1 support'), ('pyweblib',1,'http://www.stroeder.com/pylib/PyWebLib/','Yet another web application module package'), ('fcgi',0,'http://alldunn.com/python/fcgi.py','FCGI module (e.g., Apache with mod_fastcgi)'), ('md4',0,'http://www.geocities.com/rozmanov/python/md4.html','MD4 hash module for synced Samba passwords'), ('Crypto.Hash',0,'http://www.amk.ca/python/code/crypto.html','PyCrypto hash module for synced Samba passwords'), ('Crypto.Cipher',0,'http://www.amk.ca/python/code/crypto.html','PyCrypto cipher module for synced Samba passwords'), ('crypt',0,'http://www.python.org','Unix crypt hash module for client-side hashed LDAP passwords'), ('md5',0,'http://www.python.org','MD5 hash module for client-side hashed LDAP passwords'), ('sha',0,'http://www.python.org','SHA-1 hash module for client-side hashed LDAP passwords'), ('DNS',0,'http://pydns.sf.net','module for DNS lookups, e.g. SRV RRs'), ('psyco',0,'http://psyco.sourceforge.net/','Performance optimization module (special pre-compiler)'), ]: error_text_prefix={0:'Warning!',1:'Fatal Error!'}[mandantory] m_list = modulename.split('.') i = 0 while i