]>
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 ():
22 print "0 errors, %d warnings." % i
25 print "looks like you've got everything you need to run qwebirc!"
27 print "you can run qwebirc despite these."
29 f
= open ( ".checked" , "w" )
33 if not sys
. platform
. startswith ( "win" ):
39 fail ( "qwebirc requires pywin32, see:" , "http://sourceforge.net/project/showfiles.php?group_id=78018" )
42 def java_warn ( specific
):
43 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/" )
46 p
= subprocess
. Popen ([ "java" , "-version" ], stdout
= subprocess
. PIPE
, stderr
= subprocess
. PIPE
)
49 java_warn ( "something went wrong looking for java." )
52 java_warn ( "couldn't find java." )
58 def hg_warn ( specific
):
59 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/" )
62 p
= subprocess
. Popen ([ "hg" , "id" ], stdout
= subprocess
. PIPE
, stderr
= subprocess
. PIPE
)
65 hg_warn ( "something went wrong looking for mercurial." )
68 hg_warn ( "couldn't find mercurial." )
77 fail ( "qwebirc requires twisted (at least 8.2.0), see http://twistedmatrix.com/" )
79 twisted_fail
= lambda x
, y
= None : fail ( "you don't seem to have twisted's %s module." % x
,
80 "your distro is most likely modular, look for a twisted web package %s ." % ( " %s " % y
if y
else "" ,))
91 fail ( "you don't seem to have twisted's mail module, your distro is most likely modular, look for a twisted mail package." )
96 twisted_fail ( "web" , "(not web2)" )
103 if __name__
== "__main__" :
105 dependencies
. check_dependencies ()