diff options
author | Eric Jones <eric@enthought.com> | 2002-09-19 07:08:30 +0000 |
---|---|---|
committer | Eric Jones <eric@enthought.com> | 2002-09-19 07:08:30 +0000 |
commit | 200bff5384ca06d4d61570a576f94ff63b6c335d (patch) | |
tree | 780842aff1bceab242543194ef9bbb6b0044b5c8 /weave/ext_tools.py | |
parent | 9dec5004a2593a123fb80eefcb5d73a229cb7501 (diff) | |
download | numpy-200bff5384ca06d4d61570a576f94ff63b6c335d.tar.gz |
added yet another directory into the path of intermediate files generated by
weave. This is needed so that people switching between compilers don't end
up trying to link c++ object files built with incompatible compilers together.
changed Py_INCREF to a Py_XINCREF to guard against NULL pointer problems
in convert_to_xxx routines.
lengthened the type_names strings for Numeric type names in
standard_array_spec. It was shorter than some of the names. yikes!
choose_compiler stuff is no longer done by ext_modules. This was used
to allow xxx_convterters and xxx_info objects to generate different code
depending on which compiler was used. This is no longer done, and I don't
think it should be necessary going forward. I've left a little of the code
in case I'm wrong, but will probably hack it out soon.
Diffstat (limited to 'weave/ext_tools.py')
-rw-r--r-- | weave/ext_tools.py | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/weave/ext_tools.py b/weave/ext_tools.py index 326e7238d..11f9777a4 100644 --- a/weave/ext_tools.py +++ b/weave/ext_tools.py @@ -134,13 +134,13 @@ class ext_function_from_specs: return_code = " /*cleanup code*/ \n" + \ cleanup_code + \ - " if(!return_val && !exception_occured)\n" \ - " {\n \n" \ - " Py_INCREF(Py_None); \n" \ - " return_val = Py_None; \n" \ - " }\n \n" \ - " return return_val; \n" \ - "} \n" + ' if(!return_val && !exception_occured)\n' \ + ' {\n \n' \ + ' Py_INCREF(Py_None); \n' \ + ' return_val = Py_None; \n' \ + ' }\n \n' \ + ' return return_val; \n' \ + '} \n' all_code = self.function_declaration_code() + \ indent(self.parse_tuple_code(),4) + \ @@ -276,6 +276,7 @@ class ext_module: return generate_module(code,name) def set_compiler(self,compiler): + # This is not used anymore -- I think we should ditch it. #for i in self.arg_specs() # i.set_compiler(compiler) for i in self.build_information(): @@ -288,10 +289,14 @@ class ext_module: if compiler is not None: self.compiler = compiler + + # !! removed -- we don't have any compiler dependent code + # currently in spec or info classes # hmm. Is there a cleaner way to do this? Seems like - # choosing the compiler spagettis around a little. - compiler = build_tools.choose_compiler(self.compiler) - self.set_compiler(compiler) + # choosing the compiler spagettis around a little. + #compiler = build_tools.choose_compiler(self.compiler) + #self.set_compiler(compiler) + arg_specs = self.arg_specs() info = self.build_information() _source_files = info.sources() @@ -316,6 +321,7 @@ class ext_module: #temp = catalog.default_temp_dir() # for speed, build in the machines temp directory temp = catalog.intermediate_dir() + success = build_tools.build_extension(file, temp_dir = temp, sources = source_files, compiler_name = compiler, |