File tree Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Expand file tree Collapse file tree 1 file changed +1
-24
lines changed Original file line number Diff line number Diff line change @@ -55,35 +55,12 @@ def find_xml_generator(name="castxml", search_path=None):
55
55
56
56
"""
57
57
58
- if sys .version_info [:2 ] >= (3 , 3 ):
59
- path = _find_xml_generator_for_python_greater_equals_33 (
60
- name , search_path = search_path )
61
- else :
62
- path = _find_xml_generator_for_legacy_python (name )
63
-
58
+ path = shutil .which (name , path = search_path )
64
59
if path == "" or path is None :
65
60
raise Exception ("No c++ parser found. Please install castxml." )
66
61
return path .rstrip (), name
67
62
68
63
69
- def _find_xml_generator_for_python_greater_equals_33 (name , search_path = None ):
70
- return shutil .which (name , path = search_path )
71
-
72
-
73
- def _find_xml_generator_for_legacy_python (name ):
74
- if platform .system () == "Windows" :
75
- command = "where"
76
- else :
77
- command = "which"
78
- p = subprocess .Popen ([command , name ], stdout = subprocess .PIPE ,
79
- stderr = subprocess .PIPE )
80
- path = p .stdout .read ().decode ("utf-8" )
81
- p .wait ()
82
- p .stdout .close ()
83
- p .stderr .close ()
84
- return path .rstrip ()
85
-
86
-
87
64
def _create_logger_ (name ):
88
65
"""Implementation detail, creates a logger."""
89
66
logger = logging .getLogger (name )
You can’t perform that action at this time.
0 commit comments