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 @@ -50,35 +50,12 @@ def find_xml_generator(name="castxml", search_path=None):
50
50
51
51
"""
52
52
53
- if sys .version_info [:2 ] >= (3 , 3 ):
54
- path = _find_xml_generator_for_python_greater_equals_33 (
55
- name , search_path = search_path )
56
- else :
57
- path = _find_xml_generator_for_legacy_python (name )
58
-
53
+ path = shutil .which (name , path = search_path )
59
54
if path == "" or path is None :
60
55
raise Exception ("No c++ parser found. Please install castxml." )
61
56
return path .rstrip (), name
62
57
63
58
64
- def _find_xml_generator_for_python_greater_equals_33 (name , search_path = None ):
65
- return shutil .which (name , path = search_path )
66
-
67
-
68
- def _find_xml_generator_for_legacy_python (name ):
69
- if platform .system () == "Windows" :
70
- command = "where"
71
- else :
72
- command = "which"
73
- p = subprocess .Popen ([command , name ], stdout = subprocess .PIPE ,
74
- stderr = subprocess .PIPE )
75
- path = p .stdout .read ().decode ("utf-8" )
76
- p .wait ()
77
- p .stdout .close ()
78
- p .stderr .close ()
79
- return path .rstrip ()
80
-
81
-
82
59
def _create_logger_ (name ):
83
60
"""Implementation detail, creates a logger."""
84
61
logger = logging .getLogger (name )
You can’t perform that action at this time.
0 commit comments