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)
495 ext_path = self.get_ext_fullpath(ext.name)
496 depends = sources + ext.depends
498 log.debug("skipping '%s' extension (up-to-date)", ext.name)
501 log.info("building '%s' extension", ext.name)
506 sources = self.swig_sources(sources, ext)
522 extra_args = ext.extra_compile_args or []
524 macros = ext.define_macros[:]
525 for undef in ext.undef_macros:
531 include_dirs=ext.include_dirs,
534 depends=ext.depends)
543 if ext.extra_objects:
544 objects.extend(ext.extra_objects)
545 extra_args = ext.extra_link_args or []
548 language = ext.language or self.compiler.detect_language(sources)
552 libraries=self.get_libraries(ext),
553 library_dirs=ext.library_dirs,
554 runtime_library_dirs=ext.runtime_library_dirs,
556 export_symbols=self.get_export_symbols(ext),
586 (base, ext) = os.path.splitext(source)
587 if ext == ".i": # SWIG interface file
685 def get_export_symbols(self, ext): argument
691 initfunc_name = "PyInit_" + ext.name.split('.')[-1]
692 if initfunc_name not in ext.export_symbols:
693 ext.export_symbols.append(initfunc_name)
694 return ext.export_symbols
696 def get_libraries(self, ext): argument
716 return ext.libraries + [pythonlib]
718 return ext.libraries
721 return ext.libraries
724 return ext.libraries
731 return ext.libraries + [pythonlib]
733 return ext.libraries