118 return False |
118 return False |
119 |
119 |
120 def has_git(): |
120 def has_git(): |
121 return matchoutput('git --version 2>&1', r'^git version') |
121 return matchoutput('git --version 2>&1', r'^git version') |
122 |
122 |
123 def has_rst2html(): |
123 def has_docutils(): |
124 for name in ('rst2html', 'rst2html.py'): |
124 try: |
125 name = name + ' --version 2>&1' |
125 from docutils.core import publish_cmdline |
126 if matchoutput(name, r'^rst2html(?:\.py)? \(Docutils'): |
126 return True |
127 return True |
127 except ImportError: |
128 return False |
128 return False |
129 |
129 |
130 def has_svn(): |
130 def has_svn(): |
131 return matchoutput('svn --version 2>&1', r'^svn, version') and \ |
131 return matchoutput('svn --version 2>&1', r'^svn, version') and \ |
132 matchoutput('svnadmin --version 2>&1', r'^svnadmin, version') |
132 matchoutput('svnadmin --version 2>&1', r'^svnadmin, version') |
133 |
133 |
196 "lsprof": (has_lsprof, "python lsprof module"), |
196 "lsprof": (has_lsprof, "python lsprof module"), |
197 "mtn": (has_mtn, "monotone client (> 0.31)"), |
197 "mtn": (has_mtn, "monotone client (> 0.31)"), |
198 "outer-repo": (has_outer_repo, "outer repo"), |
198 "outer-repo": (has_outer_repo, "outer repo"), |
199 "p4": (has_p4, "Perforce server and client"), |
199 "p4": (has_p4, "Perforce server and client"), |
200 "pygments": (has_pygments, "Pygments source highlighting library"), |
200 "pygments": (has_pygments, "Pygments source highlighting library"), |
201 "rst2html": (has_rst2html, "Docutils rst2html tool"), |
201 "docutils": (has_docutils, "Docutils text processing library"), |
202 "svn": (has_svn, "subversion client and admin tools"), |
202 "svn": (has_svn, "subversion client and admin tools"), |
203 "svn-bindings": (has_svn_bindings, "subversion python bindings"), |
203 "svn-bindings": (has_svn_bindings, "subversion python bindings"), |
204 "symlink": (has_symlink, "symbolic links"), |
204 "symlink": (has_symlink, "symbolic links"), |
205 "tla": (has_tla, "GNU Arch tla client"), |
205 "tla": (has_tla, "GNU Arch tla client"), |
206 "unix-permissions": (has_unix_permissions, "unix-style permissions"), |
206 "unix-permissions": (has_unix_permissions, "unix-style permissions"), |