Lines Matching refs:ext
356 for i, ext in enumerate(extensions):
357 if isinstance(ext, Extension):
361 if not isinstance(ext, tuple) or len(ext) != 2:
366 ext_name, build_info = ext
385 ext = Extension(ext_name, build_info['sources'])
394 setattr(ext, key, val)
397 ext.runtime_library_dirs = build_info.get('rpath')
406 ext.define_macros = []
407 ext.undef_macros = []
414 ext.undef_macros.append(macro[0])
416 ext.define_macros.append(macro)
418 extensions[i] = ext
425 for ext in self.extensions:
426 filenames.extend(ext.sources)
439 for ext in self.extensions:
440 outputs.append(self.get_ext_fullpath(ext.name))
465 futures = [executor.submit(self.build_extension, ext)
466 for ext in self.extensions]
467 for ext, fut in zip(self.extensions, futures):
468 with self._filter_build_errors(ext):
472 for ext in self.extensions:
473 with self._filter_build_errors(ext):
474 self.build_extension(ext)
477 def _filter_build_errors(self, ext): argument
481 if not ext.optional:
484 (ext.name, e))
486 def build_extension(self, ext): argument
487 sources = ext.sources
492 "a list of source filenames" % ext.name)
496 ext_path = self.get_ext_fullpath(ext.name)
497 depends = sources + ext.depends
499 log.debug("skipping '%s' extension (up-to-date)", ext.name)
502 log.info("building '%s' extension", ext.name)
507 sources = self.swig_sources(sources, ext)
523 extra_args = ext.extra_compile_args or []
525 macros = ext.define_macros[:]
526 for undef in ext.undef_macros:
532 include_dirs=ext.include_dirs,
535 depends=ext.depends)
544 if ext.extra_objects:
545 objects.extend(ext.extra_objects)
546 extra_args = ext.extra_link_args or []
549 language = ext.language or self.compiler.detect_language(sources)
553 libraries=self.get_libraries(ext),
554 library_dirs=ext.library_dirs,
555 runtime_library_dirs=ext.runtime_library_dirs,
557 export_symbols=self.get_export_symbols(ext),
587 (base, ext) = os.path.splitext(source)
588 if ext == ".i": # SWIG interface file
686 def get_export_symbols(self, ext): argument
692 suffix = '_' + ext.name.split('.')[-1]
701 if initfunc_name not in ext.export_symbols:
702 ext.export_symbols.append(initfunc_name)
703 return ext.export_symbols
705 def get_libraries(self, ext): argument
725 return ext.libraries + [pythonlib]
752 return ext.libraries + ['python' + ldversion]
754 return ext.libraries