Author: bugman Date: Wed May 2 11:42:43 2012 New Revision: 15865 URL: http://svn.gna.org/viewcvs/relax?rev=15865&view=rev Log: Added the xml module import tests to the dep_check module. This also adds some code to differentiate between the ancient and dead PyXML which should be eliminated for Python 2.7.3 onwards and the Python internal XML module. Modified: 1.3/dep_check.py Modified: 1.3/dep_check.py URL: http://svn.gna.org/viewcvs/relax/1.3/dep_check.py?rev=15865&r1=15864&r2=15865&view=diff ============================================================================== --- 1.3/dep_check.py (original) +++ 1.3/dep_check.py Wed May 2 11:42:43 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2008-2010 Edward d'Auvergne # +# Copyright (C) 2008-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -172,6 +172,25 @@ pymol_module = True except ImportError, message: pymol_module = False + +# XML. +try: + import xml + xml_module = True +except ImportError, message: + xml_module = False +if xml_module: + # The XML version mess! + if hasattr(xml, '_MINIMUM_XMLPLUS_VERSION'): + xml_version = "%s.%s.%s" % xml._MINIMUM_XMLPLUS_VERSION + xml_type = 'internal' + elif hasattr(xml, '__version__'): + xml_version = xml.__version__ + xml_type = 'PyXML' + else: + xml_version = '' + xml_type = '' + # Compiled C modules.