Show More
@@ -21,18 +21,21 b' def matchoutput(cmd, regexp, ignorestatu' | |||||
21 | ret = fh.close() |
|
21 | ret = fh.close() | |
22 | return (ignorestatus or ret is None) and r.search(s) |
|
22 | return (ignorestatus or ret is None) and r.search(s) | |
23 |
|
23 | |||
24 | def has_symlink(): |
|
|||
25 | return hasattr(os, "symlink") |
|
|||
26 |
|
||||
27 | def has_fifo(): |
|
|||
28 | return hasattr(os, "mkfifo") |
|
|||
29 |
|
||||
30 | def has_cvs(): |
|
24 | def has_cvs(): | |
31 | return matchoutput('cvs --version 2>&1', r'Concurrent Versions System') |
|
25 | return matchoutput('cvs --version 2>&1', r'Concurrent Versions System') | |
32 |
|
26 | |||
33 | def has_cvsps(): |
|
27 | def has_cvsps(): | |
34 | return matchoutput('cvsps -h -q 2>&1', r'cvsps version', True) |
|
28 | return matchoutput('cvsps -h -q 2>&1', r'cvsps version', True) | |
35 |
|
29 | |||
|
30 | def has_eol_in_paths(): | |||
|
31 | try: | |||
|
32 | fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r') | |||
|
33 | os.close(fd) | |||
|
34 | os.remove(path) | |||
|
35 | return True | |||
|
36 | except: | |||
|
37 | return False | |||
|
38 | ||||
36 | def has_executablebit(): |
|
39 | def has_executablebit(): | |
37 | fd, path = tempfile.mkstemp(prefix=tempprefix) |
|
40 | fd, path = tempfile.mkstemp(prefix=tempprefix) | |
38 | os.close(fd) |
|
41 | os.close(fd) | |
@@ -43,14 +46,8 b' def has_executablebit():' | |||||
43 | finally: |
|
46 | finally: | |
44 | os.remove(path) |
|
47 | os.remove(path) | |
45 |
|
48 | |||
46 |
def has_ |
|
49 | def has_fifo(): | |
47 | try: |
|
50 | return hasattr(os, "mkfifo") | |
48 | fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r') |
|
|||
49 | os.close(fd) |
|
|||
50 | os.remove(path) |
|
|||
51 | return True |
|
|||
52 | except: |
|
|||
53 | return False |
|
|||
54 |
|
51 | |||
55 | def has_hotshot(): |
|
52 | def has_hotshot(): | |
56 | try: |
|
53 | try: | |
@@ -82,13 +79,16 b' def has_svn_bindings():' | |||||
82 | except ImportError: |
|
79 | except ImportError: | |
83 | return False |
|
80 | return False | |
84 |
|
81 | |||
|
82 | def has_symlink(): | |||
|
83 | return hasattr(os, "symlink") | |||
|
84 | ||||
85 | checks = { |
|
85 | checks = { | |
86 | "cvs": (has_cvs, "cvs client"), |
|
86 | "cvs": (has_cvs, "cvs client"), | |
87 | "cvsps": (has_cvsps, "cvsps utility"), |
|
87 | "cvsps": (has_cvsps, "cvsps utility"), | |
88 | "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), |
|
88 | "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"), | |
89 | "execbit": (has_executablebit, "executable bit"), |
|
89 | "execbit": (has_executablebit, "executable bit"), | |
|
90 | "fifo": (has_fifo, "named pipes"), | |||
90 | "git": (has_git, "git command line client"), |
|
91 | "git": (has_git, "git command line client"), | |
91 | "fifo": (has_fifo, "named pipes"), |
|
|||
92 | "hotshot": (has_hotshot, "python hotshot module"), |
|
92 | "hotshot": (has_hotshot, "python hotshot module"), | |
93 | "lsprof": (has_lsprof, "python lsprof module"), |
|
93 | "lsprof": (has_lsprof, "python lsprof module"), | |
94 | "svn": (has_svn, "subversion client and admin tools"), |
|
94 | "svn": (has_svn, "subversion client and admin tools"), |
General Comments 0
You need to be logged in to leave comments.
Login now