]>
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 ():
23 print "0 errors, %d warnings." % i
26 print "looks like you've got everything you need to run qwebirc!"
28 print "you can run qwebirc despite these."
30 f
= open ( ".checked" , "w" )
34 if not sys
. platform
. startswith ( "win" ):
40 fail ( "qwebirc requires pywin32, see:" , "http://sourceforge.net/project/showfiles.php?group_id=78018" )
43 def java_warn ( specific
):
44 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/" )
47 p
= subprocess
. Popen ([ "java" , "-version" ], stdout
= subprocess
. PIPE
, stderr
= subprocess
. PIPE
)
50 java_warn ( "something went wrong looking for java." )
53 java_warn ( "couldn't find java." )
59 def hg_warn ( specific
):
60 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/" )
63 p
= subprocess
. Popen ([ "hg" , "id" ], stdout
= subprocess
. PIPE
, stderr
= subprocess
. PIPE
)
66 hg_warn ( "something went wrong looking for mercurial." )
69 hg_warn ( "couldn't find mercurial." )
78 fail ( "qwebirc requires twisted (at least 8.2.0), see http://twistedmatrix.com/" )
80 def twisted_fail ( x
, y
= None ):
81 fail ( "you don't seem to have twisted's %s module." % x
,
82 "your distro is most likely modular, look for a twisted %s package %s ." % ( x
, " %s " % y
if y
else "" ,))
97 twisted_fail ( "web" , "(not web2)" )
102 twisted_fail ( "words" )
105 import qwebirc
. util
. qjson
106 if qwebirc
. util
. qjson
. slow
:
107 warn ( "simplejson module with C speedups not installed." ,
108 "using embedded module (slower); consider installing simplejson from:" ,
109 "http://pypi.python.org/pypi/simplejson/" )
113 if __name__
== "__main__" :
115 dependencies
. check_dependencies ()