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

Remove broken recursive option.

parent c144c807
......@@ -43,10 +43,6 @@ Options:
-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:
# -C, --compile Compile generated .c file to .o file
# --link Link .o file to produce extension module (implies -C)
......@@ -98,8 +94,6 @@ def parse_command_line(args):
options.working_path = pop_arg()
elif option in ("-o", "--output-file"):
options.output_file = pop_arg()
elif option in ("-r", "--recursive"):
options.recursive = 1
elif option in ("-t", "--timestamps"):
options.timestamps = 1
elif option in ("-f", "--force"):
......
......@@ -456,11 +456,8 @@ class CompilationOptions(object):
capi_reexport_cincludes
boolean Add cincluded headers to any auto-generated
header files.
recursive boolean Recursively find and compile dependencies
timestamps boolean Only compile changed source files. If None,
defaults to true when recursive is true.
timestamps boolean Only compile changed source files.
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)
evaluate_tree_assertions boolean Test support: evaluate parse tree assertions
language_level integer The Python language level: 2 or 3
......@@ -562,11 +559,8 @@ def compile_multiple(sources, options):
sources = [os.path.abspath(source) for source in sources]
processed = set()
results = CompilationResultSet()
recursive = options.recursive
timestamps = options.timestamps
if timestamps is None:
timestamps = recursive
verbose = options.verbose or ((recursive or timestamps) and not options.quiet)
verbose = options.verbose
context = None
for source in sources:
if source not in processed:
......@@ -582,14 +576,6 @@ def compile_multiple(sources, options):
# work properly yet.
context = None
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
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.
"""
options = CompilationOptions(defaults = options, **kwds)
if isinstance(source, basestring) and not options.timestamps \
and not options.recursive:
if isinstance(source, basestring) and not options.timestamps:
return compile_single(source, options, full_module_name)
else:
return compile_multiple(source, options)
......@@ -659,7 +644,6 @@ default_options = dict(
generate_pxi = 0,
capi_reexport_cincludes = 0,
working_path = "",
recursive = 0,
timestamps = None,
verbose = 0,
quiet = 0,
......
......@@ -105,8 +105,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
env.return_type = PyrexTypes.c_void_type
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.generate_c_code(env, options, result)
self.generate_h_code(env, options, result)
......@@ -119,20 +117,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
return 1
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 h_entries(entries, api=0, pxd=0):
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