]>
jfr.im git - irc/quakenet/qwebirc.git/blob - bin/dependencies_b.py
1 # this is seperate to allow us to use python 2.5 syntax without
2 # the dependency checker breaking on earlier versions.
8 print >> sys
. stderr
, " \n " . join ( message
)
12 print >> sys
. stderr
, "warning:" , " \n warning: " . join ( message
), " \n "
14 def check_dependencies ():
25 print "0 errors, %d warnings." % i
28 print "looks like you've got everything you need to run qwebirc!"
30 print "you can run qwebirc despite these."
32 f
= open ( ".checked" , "w" )
36 if not sys
. platform
. startswith ( "win" ):
42 fail ( "qwebirc requires pywin32, see:" , "http://sourceforge.net/project/showfiles.php?group_id=78018" )
45 def java_warn ( specific
):
46 warn ( specific
, "java is not required, but allows qwebirc to compress output," , "making it faster to download." , "you can get java at http://www.java.com/" )
49 p
= subprocess
. Popen ([ "java" , "-version" ], stdout
= subprocess
. PIPE
, stderr
= subprocess
. PIPE
)
52 java_warn ( "something went wrong looking for java." )
55 java_warn ( "couldn't find java." )
61 def hg_warn ( specific
):
62 warn ( specific
, "mercurial (hg) is not required, but allows qwebirc to save bandwidth by versioning." , "you can get hg at http://www.selenic.com/mercurial/" )
65 p
= subprocess
. Popen ([ "hg" , "id" ], stdout
= subprocess
. PIPE
, stderr
= subprocess
. PIPE
)
68 hg_warn ( "something went wrong looking for mercurial." )
71 hg_warn ( "couldn't find mercurial." )
78 from zope
. interface
import Interface
80 if sys
. platform
. startswith ( "win" ):
81 fail ( "qwebirc requires zope interface" ,
82 "see pypi: http://pypi.python.org/pypi/zope.interface" )
84 fail ( "qwebirc requires zope interface." ,
85 "this should normally come with twisted, but can be downloaded" ,
86 "from pypi: http://pypi.python.org/pypi/zope.interface" )
92 fail ( "qwebirc requires twisted (at least 8.2.0), see http://twistedmatrix.com/" )
94 def twisted_fail ( x
, y
= None ):
95 fail ( "you don't seem to have twisted's %s module." % x
,
96 "your distro is most likely modular, look for a twisted %s package %s ." % ( x
, " %s " % y
if y
else "" ,))
101 twisted_fail ( "names" )
111 twisted_fail ( "web" , "(not web2)" )
116 twisted_fail ( "words" )
119 import qwebirc
. util
. qjson
120 if qwebirc
. util
. qjson
. slow
:
121 warn ( "simplejson module with C speedups not installed." ,
122 "using embedded module (slower); consider installing simplejson from:" ,
123 "http://pypi.python.org/pypi/simplejson/" )
127 def check_autobahn ():
129 import autobahn
. websocket
132 warn ( "autobahn not installed; websocket support will be disabled." ,
133 "consider installing autobahn from:" ,
134 "http://autobahn.ws/python/getstarted/" )
137 if __name__
== "__main__" :
139 dependencies
. check_dependencies ()