Commit 67c183d5 authored by Robert Bradshaw's avatar Robert Bradshaw

Remove broken recursive option.

parent c144c807
...@@ -43,10 +43,6 @@ Options: ...@@ -43,10 +43,6 @@ Options:
-X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive -X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
""" """
# The following is broken http://trac.cython.org/cython_trac/ticket/379
# -r, --recursive Recursively find and compile dependencies (implies -t)
#The following experimental options are supported only on MacOSX: #The following experimental options are supported only on MacOSX:
# -C, --compile Compile generated .c file to .o file # -C, --compile Compile generated .c file to .o file
# --link Link .o file to produce extension module (implies -C) # --link Link .o file to produce extension module (implies -C)
...@@ -98,8 +94,6 @@ def parse_command_line(args): ...@@ -98,8 +94,6 @@ def parse_command_line(args):
options.working_path = pop_arg() options.working_path = pop_arg()
elif option in ("-o", "--output-file"): elif option in ("-o", "--output-file"):
options.output_file = pop_arg() options.output_file = pop_arg()
elif option in ("-r", "--recursive"):
options.recursive = 1
elif option in ("-t", "--timestamps"): elif option in ("-t", "--timestamps"):
options.timestamps = 1 options.timestamps = 1
elif option in ("-f", "--force"): elif option in ("-f", "--force"):
......
...@@ -456,11 +456,8 @@ class CompilationOptions(object): ...@@ -456,11 +456,8 @@ class CompilationOptions(object):
capi_reexport_cincludes capi_reexport_cincludes
boolean Add cincluded headers to any auto-generated boolean Add cincluded headers to any auto-generated
header files. header files.
recursive boolean Recursively find and compile dependencies timestamps boolean Only compile changed source files.
timestamps boolean Only compile changed source files. If None,
defaults to true when recursive is true.
verbose boolean Always print source names being compiled verbose boolean Always print source names being compiled
quiet boolean Don't print source names in recursive mode
compiler_directives dict Overrides for pragma options (see Options.py) compiler_directives dict Overrides for pragma options (see Options.py)
evaluate_tree_assertions boolean Test support: evaluate parse tree assertions evaluate_tree_assertions boolean Test support: evaluate parse tree assertions
language_level integer The Python language level: 2 or 3 language_level integer The Python language level: 2 or 3
...@@ -562,11 +559,8 @@ def compile_multiple(sources, options): ...@@ -562,11 +559,8 @@ def compile_multiple(sources, options):
sources = [os.path.abspath(source) for source in sources] sources = [os.path.abspath(source) for source in sources]
processed = set() processed = set()
results = CompilationResultSet() results = CompilationResultSet()
recursive = options.recursive
timestamps = options.timestamps timestamps = options.timestamps
if timestamps is None: verbose = options.verbose
timestamps = recursive
verbose = options.verbose or ((recursive or timestamps) and not options.quiet)
context = None context = None
for source in sources: for source in sources:
if source not in processed: if source not in processed:
...@@ -582,14 +576,6 @@ def compile_multiple(sources, options): ...@@ -582,14 +576,6 @@ def compile_multiple(sources, options):
# work properly yet. # work properly yet.
context = None context = None
processed.add(source) processed.add(source)
if recursive:
for module_name in context.find_cimported_module_names(source):
path = context.find_pyx_file(module_name, [source])
if path:
sources.append(path)
else:
sys.stderr.write(
"Cannot find .pyx file for cimported module '%s'\n" % module_name)
return results return results
def compile(source, options = None, full_module_name = None, **kwds): def compile(source, options = None, full_module_name = None, **kwds):
...@@ -603,8 +589,7 @@ def compile(source, options = None, full_module_name = None, **kwds): ...@@ -603,8 +589,7 @@ def compile(source, options = None, full_module_name = None, **kwds):
CompilationResultSet is returned. CompilationResultSet is returned.
""" """
options = CompilationOptions(defaults = options, **kwds) options = CompilationOptions(defaults = options, **kwds)
if isinstance(source, basestring) and not options.timestamps \ if isinstance(source, basestring) and not options.timestamps:
and not options.recursive:
return compile_single(source, options, full_module_name) return compile_single(source, options, full_module_name)
else: else:
return compile_multiple(source, options) return compile_multiple(source, options)
...@@ -659,7 +644,6 @@ default_options = dict( ...@@ -659,7 +644,6 @@ default_options = dict(
generate_pxi = 0, generate_pxi = 0,
capi_reexport_cincludes = 0, capi_reexport_cincludes = 0,
working_path = "", working_path = "",
recursive = 0,
timestamps = None, timestamps = None,
verbose = 0, verbose = 0,
quiet = 0, quiet = 0,
......
...@@ -105,8 +105,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -105,8 +105,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env.return_type = PyrexTypes.c_void_type env.return_type = PyrexTypes.c_void_type
self.referenced_modules = [] self.referenced_modules = []
self.find_referenced_modules(env, self.referenced_modules, {}) self.find_referenced_modules(env, self.referenced_modules, {})
if options.recursive:
self.generate_dep_file(env, result)
self.sort_cdef_classes(env) self.sort_cdef_classes(env)
self.generate_c_code(env, options, result) self.generate_c_code(env, options, result)
self.generate_h_code(env, options, result) self.generate_h_code(env, options, result)
...@@ -119,20 +117,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -119,20 +117,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
return 1 return 1
return 0 return 0
def generate_dep_file(self, env, result):
modules = self.referenced_modules
if len(modules) > 1 or env.included_files:
dep_file = replace_suffix(result.c_file, ".dep")
f = open(dep_file, "w")
try:
for module in modules:
if module is not env:
f.write("cimport %s\n" % module.qualified_name)
for path in module.included_files:
f.write("include %s\n" % path)
finally:
f.close()
def generate_h_code(self, env, options, result): def generate_h_code(self, env, options, result):
def h_entries(entries, api=0, pxd=0): def h_entries(entries, api=0, pxd=0):
return [entry for entry in entries return [entry for entry in entries
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment