]>
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 ():
24 print "0 errors, %d warnings." % i
27 print "looks like you've got everything you need to run qwebirc!"
29 print "you can run qwebirc despite these."
31 f
= open ( ".checked" , "w" )
35 if not sys
. platform
. startswith ( "win" ):
41 fail ( "qwebirc requires pywin32, see:" , "http://sourceforge.net/project/showfiles.php?group_id=78018" )
44 def java_warn ( specific
):
45 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/" )
48 p
= subprocess
. Popen ([ "java" , "-version" ], stdout
= subprocess
. PIPE
, stderr
= subprocess
. PIPE
)
51 java_warn ( "something went wrong looking for java." )
54 java_warn ( "couldn't find java." )
60 def hg_warn ( specific
):
61 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/" )
64 p
= subprocess
. Popen ([ "hg" , "id" ], stdout
= subprocess
. PIPE
, stderr
= subprocess
. PIPE
)
67 hg_warn ( "something went wrong looking for mercurial." )
70 hg_warn ( "couldn't find mercurial." )
77 from zope
. interface
import Interface
79 if sys
. platform
. startswith ( "win" ):
80 fail ( "qwebirc requires zope interface" ,
81 "see pypi: http://pypi.python.org/pypi/zope.interface" )
83 fail ( "qwebirc requires zope interface." ,
84 "this should normally come with twisted, but can be downloaded" ,
85 "from pypi: http://pypi.python.org/pypi/zope.interface" )
91 fail ( "qwebirc requires twisted (at least 8.2.0), see http://twistedmatrix.com/" )
93 def twisted_fail ( x
, y
= None ):
94 fail ( "you don't seem to have twisted's %s module." % x
,
95 "your distro is most likely modular, look for a twisted %s package %s ." % ( x
, " %s " % y
if y
else "" ,))
100 twisted_fail ( "names" )
110 twisted_fail ( "web" , "(not web2)" )
115 twisted_fail ( "words" )
118 import qwebirc
. util
. qjson
119 if qwebirc
. util
. qjson
. slow
:
120 warn ( "simplejson module with C speedups not installed." ,
121 "using embedded module (slower); consider installing simplejson from:" ,
122 "http://pypi.python.org/pypi/simplejson/" )
126 if __name__
== "__main__" :
128 dependencies
. check_dependencies ()