i = 0\r
\r
check_twisted()\r
+ check_zope()\r
check_win32()\r
+ i+=check_json()\r
i+=check_java()\r
i+=check_hg()\r
\r
\r
return 0\r
\r
+def check_zope():\r
+ try:\r
+ from zope.interface import Interface\r
+ except ImportError:\r
+ if sys.platform.startswith("win"):\r
+ fail("qwebirc requires zope interface",\r
+ "see pypi: http://pypi.python.org/pypi/zope.interface")\r
+ else:\r
+ fail("qwebirc requires zope interface.",\r
+ "this should normally come with twisted, but can be downloaded",\r
+ "from pypi: http://pypi.python.org/pypi/zope.interface")\r
+ \r
def check_twisted():\r
try:\r
import twisted\r
import twisted.words\r
except ImportError:\r
twisted_fail("words")\r
-\r
+ \r
+def check_json():\r
+ import qwebirc.util.qjson\r
+ if qwebirc.util.qjson.slow:\r
+ warn("simplejson module with C speedups not installed.",\r
+ "using embedded module (slower); consider installing simplejson from:",\r
+ "http://pypi.python.org/pypi/simplejson/")\r
+ return 1\r
+ return 0\r
+ \r
if __name__ == "__main__":\r
import dependencies\r
dependencies.check_dependencies()\r