From: Lisandro Dalcin Date: Thu, 17 Dec 2009 23:48:31 +0000 (-0300) Subject: remove old Pyrex code for calling a C compiler to build extension modules X-Git-Tag: 0.12.1~37 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=973feb04c0b9acadea6a024b635382a0e28fad05;p=cython.git remove old Pyrex code for calling a C compiler to build extension modules --- diff --git a/Cython/Compiler/CmdLine.py b/Cython/Compiler/CmdLine.py index 92e66e8c..633d2b7e 100644 --- a/Cython/Compiler/CmdLine.py +++ b/Cython/Compiler/CmdLine.py @@ -80,11 +80,6 @@ def parse_command_line(args): options.show_version = 1 elif option in ("-l", "--create-listing"): options.use_listing_file = 1 - elif option in ("-C", "--compile"): - options.c_only = 0 - elif option in ("--link"): - options.c_only = 0 - options.obj_only = 0 elif option in ("-+", "--cplus"): options.cplus = 1 elif option == "--embed": @@ -135,14 +130,9 @@ def parse_command_line(args): elif arg.endswith(".py"): # maybe do some other stuff, but this should work for now sources.append(arg) - elif arg.endswith(".o"): - options.objects.append(arg) else: sys.stderr.write( "cython: %s: Unknown filename suffix\n" % arg) - if options.objects and len(sources) > 1: - sys.stderr.write( - "cython: Only one source file allowed together with .o files\n") if options.use_listing_file and len(sources) > 1: sys.stderr.write( "cython: Only one source file allowed when using -o\n") diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index e869e981..04f4bc2c 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -509,15 +509,6 @@ class Context(object): except EnvironmentError: pass result.c_file = None - if result.c_file and not options.c_only and c_compile: - result.object_file = c_compile(result.c_file, - verbose_flag = options.show_version, - cplus = options.cplus) - if not options.obj_only and c_link: - result.extension_file = c_link(result.object_file, - extra_objects = options.objects, - verbose_flag = options.show_version, - cplus = options.cplus) def create_parse(context): def parse(compsrc): @@ -605,17 +596,11 @@ class CompilationOptions(object): compiler_directives dict Overrides for pragma options (see Options.py) evaluate_tree_assertions boolean Test support: evaluate parse tree assertions - Following options are experimental and only used on MacOSX: - - c_only boolean Stop after generating C file (default) - obj_only boolean Stop after compiling to .o file - objects [string] Extra .o files to link with cplus boolean Compile as c++ code """ - def __init__(self, defaults = None, c_compile = 0, c_link = 0, **kw): + def __init__(self, defaults = None, **kw): self.include_path = [] - self.objects = [] if defaults: if isinstance(defaults, CompilationOptions): defaults = defaults.__dict__ @@ -623,10 +608,6 @@ class CompilationOptions(object): defaults = default_options self.__dict__.update(defaults) self.__dict__.update(kw) - if c_compile: - self.c_only = 0 - if c_link: - self.obj_only = 0 class CompilationResult(object): @@ -719,8 +700,7 @@ def compile_multiple(sources, options): "Cannot find .pyx file for cimported module '%s'\n" % module_name) return results -def compile(source, options = None, c_compile = 0, c_link = 0, - full_module_name = None, **kwds): +def compile(source, options = None, full_module_name = None, **kwds): """ compile(source [, options], [,