@@ -31,12 +31,12 @@ def _compile(input_path):
31
31
for compiler in self .compilers :
32
32
compiler = compiler (verbose = self .verbose , storage = self .storage )
33
33
if compiler .match_file (input_path ):
34
- output_path = self .output_path (input_path , compiler .output_extension )
34
+ output_path = compiler .output_path (input_path , compiler .output_extension )
35
35
try :
36
36
infile = self .storage .path (input_path )
37
37
except NotImplementedError :
38
38
infile = finders .find (input_path )
39
- outfile = self .output_path (infile , compiler .output_extension )
39
+ outfile = compiler .output_path (infile , compiler .output_extension )
40
40
outdated = compiler .is_outdated (input_path , output_path )
41
41
compiler .compile_file (infile , outfile ,
42
42
outdated = outdated , force = force )
@@ -53,10 +53,6 @@ def _compile(input_path):
53
53
with futures .ThreadPoolExecutor (max_workers = multiprocessing .cpu_count ()) as executor :
54
54
return list (executor .map (_compile , paths ))
55
55
56
- def output_path (self , path , extension ):
57
- path = os .path .splitext (path )
58
- return '.' .join ((path [0 ], extension ))
59
-
60
56
61
57
class CompilerBase (object ):
62
58
def __init__ (self , verbose , storage ):
@@ -78,6 +74,10 @@ def read_file(self, path):
78
74
file .close ()
79
75
return content
80
76
77
+ def output_path (self , path , extension ):
78
+ path = os .path .splitext (path )
79
+ return '.' .join ((path [0 ], extension ))
80
+
81
81
def is_outdated (self , infile , outfile ):
82
82
if not self .storage .exists (outfile ):
83
83
return True
0 commit comments