else:
c_suffix = ".c"
result.c_file = Utils.replace_suffix(source_desc.filename, c_suffix)
- # The below doesn't make any sense? Why is it there?
- c_stat = None
- if result.c_file:
- try:
- c_stat = os.stat(result.c_file)
- except EnvironmentError:
- pass
return result
-def run_pipeline(source, options, full_module_name = None):
- # Set up context
- context = Context(options.include_path)
-
+def run_pipeline(source, context, options, full_module_name = None):
# Set up source object
cwd = os.getcwd()
source_desc = FileSourceDescriptor(os.path.join(cwd, source))
Always compiles a single file; does not perform timestamp checking or
recursion.
"""
- return run_pipeline(source, options, full_module_name)
+ context = Context(options.include_path)
+ return run_pipeline(source, context, options, full_module_name)
# context = Context(options.include_path)
# return context.compile(source, options, full_module_name)
timestamps = recursive
verbose = options.verbose or ((recursive or timestamps) and not options.quiet)
for source in sources:
- context = Context(options.include_path) # to be removed later
if source not in processed:
+ # Compiling multiple sources in one context doesn't quite
+ # work properly yet.
+ context = Context(options.include_path) # to be removed later
if not timestamps or context.c_file_out_of_date(source):
if verbose:
sys.stderr.write("Compiling %s\n" % source)
- result = context.compile(source, options)
- # Compiling multiple sources in one context doesn't quite
- # work properly yet.
+ result = run_pipeline(source, context, options)
results.add(source, result)
processed.add(source)
if recursive:
and not options.recursive:
return compile_single(source, options, full_module_name)
else:
- # Hack it for wednesday dev1
- assert len(source) == 1
- return compile_single(source[0], options)
-# return compile_multiple(source, options)
+ return compile_multiple(source, options)
#------------------------------------------------------------------------
#