def __init__(self, *args, **kwargs): from numpy import get_include from numpy.distutils.misc_util import get_info kwargs.update(get_info('npymath')) kwargs['include_dirs'] += [get_include()] Extension.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): if 'error' in kwargs: self.error = kwargs['error'] del kwargs['error'] args = ('Cannot be built', []) _Extension.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): self._include_dirs = [] eprsrcdir = kwargs.pop('eprsrcdir', None) Extension.__init__(self, *args, **kwargs) if not any('epr_' in src for src in self.sources): self.sources.extend(self._extra_sources(eprsrcdir)) self.setup_requires_cython = False
def __init__(self, *args, **kwargs): Extension.__init__(self, *args, **kwargs) self.cython_directives = { 'c_string_encoding': 'utf-8', 'profile': 'USE_PROFILE' in environ, 'embedsignature': 'USE_EMBEDSIGNATURE' in environ} # XXX with pip, setuptools is imported before distutils, and change # our pyx to c, then, cythonize doesn't happen. So force again our # sources self.sources = args[1]
def __init__(self, key, **opts): self.boodler_key = key modname = 'boodle.cboodle_'+key ls = ['audev-'+key, 'cboodle-'+key, 'noteq', 'sample'] ls = [ ('src/cboodle/' + val + '.c') for val in ls ] avail = opts.pop('available', None) if (avail): self.ext_available = avail Extension.__init__(self, modname, ls, **opts)
def __init__(self, name): # Describe the extension sources = [ 'rl/readline.c', 'rl/stringarray.c', 'rl/unicode.c', 'rl/iterator.c', 'rl/modulestate.c', ] Extension.__init__(self, name, sources) # Use include and library dirs from Python build self.use_include_dirs() self.use_library_dirs() # Use Mac Python library dir if sys.platform == 'darwin': if sys_path_contains('/Library/Frameworks/Python.framework'): self.library_dirs.append( '/Library/Frameworks/Python.framework/Versions/%d.%d/lib' % sys.version_info[:2]) self.use_static_readline() self.suppress_warnings() self.strip_debug_symbols()
def __init__(self, name, cmd, cwd=".", output_dir=".", env=None): Extension.__init__(self, name, sources=[]) self.cmd = cmd self.cwd = path.normpath(cwd) self.output_dir = path.normpath(output_dir) self.env = env or dict(os.environ)
def __init__(self, *args, **kwargs): packages = kwargs.pop('pkg_config', []) for package in packages: options = self.__options_for_package(package, kwargs) _Extension.__init__(self, *args, **kwargs)
def __init__(self, name): Extension.__init__(self, name, sources=[])
def __init__(self, name, sourcedir, build_with_cuda): Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(sourcedir) self.build_with_cuda = build_with_cuda
def __init__(self, *args, **kwargs): self.export_include = kwargs.pop('export_include', []) Extension.__init__(self, *args, **kwargs)
def __init__(self, name, cmake_lists_dir=None, **kwargs): Extension.__init__(self, name, sources=[], **kwargs) if cmake_lists_dir is None: self.sourcedir = os.path.dirname(os.path.abspath(__file__)) else: self.sourcedir = os.path.dirname(os.path.abspath(cmake_lists_dir))
def __init__(self, name, sourcedir=''): Extension.__init__(self, name, sources=[]) self.sourcedir = sourcedir
def __init__(self, name, sourcedir='', exclude_arch=False): Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(sourcedir) self.exclude_arch = exclude_arch
def __init__(self, name, sourcedir='', namespace=''): Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(sourcedir) self.namespace = namespace
def __init__(self, name): # Don't run the default setup-tools build commands, use the custom one Extension.__init__(self, name=name, sources=[])
def __init__(self, name, cmake_lists_dir='.', sources=None, **kwa): sources = [] if sources is None else sources Extension.__init__(self, name, sources=sources, **kwa) self.cmake_lists_dir = os.path.abspath(cmake_lists_dir)
def __init__(self, name, sourcedir=''): Extension.__init__(self, name, sources=[]) self.sourcedir = str(Path(sourcedir).resolve())
def __init__(self): Extension.__init__(self, name=self.extension_name, sources=[])
def __init__(self, name, sourcedir=''): Extension.__init__(self, name, sources=[]) self.source_dir = os.path.abspath(sourcedir) self.super_build_dir = os.path.join(self.source_dir, 'build') self.build_dir = os.path.join(self.super_build_dir, 'MYPROJECT-build')
def __init__(self, *args, **kwargs): self.export_include = kwargs.pop('export_include', []) Extension.__init__(self, *args, **kwargs)
def __init__(self, name, sourcedir='', *args, **kwargs): Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(os.path.join(CURRENT_DIR))
def __init__(self, name): # don't invoke the original build_ext for this special extension Extension.__init__(self, name, sources=[])
def __init__(self, sourcedir): Extension.__init__(self, '', sources=[]) self.sourcedir = os.path.abspath(sourcedir)
def __init__(self, *args, **kwargs): Extension.__init__(self, *args, **kwargs) self._include_dirs = self.include_dirs del self.include_dirs # restore overwritten property
def __init__(self, name, sourcedir='', subdir=''): Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(sourcedir) self.subdir = subdir
def __init__(self, name, sourcedir='', library_dirs=[]): Extension.__init__(self, name, sources=[], library_dirs=library_dirs) self.sourcedir = os.path.abspath(sourcedir)
def __init__(self, name, sourcedir=''): check_for_cmake() Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(sourcedir)
def __init__(self, name, filename_list): Extension.__init__(self, name, sources=[]) self.filename_list = filename_list
def __init__(self, name): # don't invoke the original build_ext for this special extension Extension.__init__(self, name, sources=[])
def __init__(self, name, sourcedir=""): Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(sourcedir)
def __init__(self, name, cmd, cwd=".", output_dir=".", env=None): Extension.__init__(self, name, sources=[]) self.cmd = cmd self.cwd = os.path.normpath(cwd) self.output_dir = os.path.normpath(output_dir) self.env = env or dict(os.environ)
def __init__(self): Extension.__init__(self, name="taosenai.pywrapfst", sources=[])
def __init__(self, *args, **kwargs): self.avx2_defs = kwargs.pop("avx2_defs", {}) Extension.__init__(self, *args, **kwargs)
def __init__(self, name, source_dir='', build_dir=None): Extension.__init__(self, name, sources=[]) self.source_dir = os.path.abspath(source_dir) self.build_dir = os.path.abspath(build_dir)
def __init__(self, *args, **kwargs): save_sources = kwargs.get('sources', None) _Extension.__init__(self, *args, **kwargs) self.sources = save_sources
def __init__(self, *args, **kwargs): self.condition = kwargs.pop("condition", lambda builder: True) Extension.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs): Extension.__init__(self, *args, **kwargs) self._include_dirs = self.include_dirs del self.include_dirs # restore overwritten property
def __init__(self, *args, **kwargs): self.libraries = [] self.define_macros = [] # Python 2 has this as an old-style class for some reason # so super() doesn't work. _Extension.__init__(self, *args, **kwargs) # pylint:disable=no-member,non-parent-init-called
def __init__(self, name, cmakelists_dir='.', **kw): Extension.__init__(self, name, sources=[], **kw) self.cmakelists_dir = Path(cmakelists_dir).resolve()
def __init__(self, *args, **kwargs): self.libraries = [] self.define_macros = [] # Python 2 has this as an old-style class for some reason # so super() doesn't work. _Extension.__init__(self, *args, **kwargs) # pylint:disable=no-member,non-parent-init-called
def __init__(self, *args, **kwargs): self.condition = kwargs.pop("condition", lambda builder: True) Extension.__init__(self, *args, **kwargs)
def __init__(self, name, cmake_lists_dir='.', sources=[], **kwa): Extension.__init__(self, name, sources=sources, **kwa) self.cmake_lists_dir = os.path.abspath(cmake_lists_dir)
def __init__(self, name, sources, dsos=None, **kws): _Extension.__init__(self, name, sources, **kws) self.dsos = dsos or []
def __init__(self, *args, **kwargs): if 'define_macros' in kwargs or 'undef_macros' in kwargs: raise DistutilsOptionError('D does not support macros, so the' ' "define_macros" and "undef_macros" arguments are not' ' supported. Instead, consider using the "Version Condition"' ' and "Debug Condition" conditional compilation features' ' documented at http://www.digitalmars.com/d/version.html' '\n Version flags can be passed to the compiler via the' ' "version_flags" keyword argument to DExtension; debug flags' ' via the "debug_flags" keyword argument. For example, when' ' used with the DMD compiler,' '\n DExtension(..., version_flags=["a", "b"])' '\nwill cause' '\n -version=a -version=b' '\nto be passed to the compiler.' ) # If the user has requested any version_flags or debug_flags, we use # the distutils 'define_macros' keyword argument to carry them (they're # later unpacked in the dcompiler module). define_macros = [] if 'version_flags' in kwargs or 'debug_flags' in kwargs: if 'version_flags' in kwargs: for flag in kwargs['version_flags']: define_macros.append((flag, 'version')) del kwargs['version_flags'] if 'debug_flags' in kwargs: for flag in kwargs['debug_flags']: define_macros.append((flag, 'debug')) del kwargs['debug_flags'] # Pass in the extension name so the compiler class can know it if 'name' in kwargs: define_macros.append((kwargs['name'], 'name')) elif len(args) > 0: define_macros.append((args[0], 'name')) # Pass in the 'tango' flag, also with_tango = kwargs.pop('tango', False) if with_tango: define_macros.append(('Pyd_with_Tango', 'version')) kwargs['define_macros'] = define_macros # Similarly, pass in with_pyd, &c, via define_macros. if 'raw_only' in kwargs: kwargs['with_pyd'] = False kwargs['with_st'] = False kwargs['with_meta'] = False kwargs['with_main'] = False del kwargs['raw_only'] with_pyd = kwargs.pop('with_pyd', True) with_st = kwargs.pop('with_st', False) # 5/23/07 st off by default. # StackThreads doesn't work with Tango at the moment. if with_tango: with_st = False with_meta = kwargs.pop('with_meta', True) with_main = kwargs.pop('with_main', True) if with_pyd and not with_meta: raise DistutilsOptionError( 'Cannot specify with_meta=False while using Pyd. Specify' ' raw_only=True or with_pyd=False if you want to compile a raw Python/C' ' extension.' ) if with_main and not with_pyd: # The special PydMain function should only be used when using Pyd with_main = False define_macros.append(((with_pyd, with_st, with_meta, with_main), 'aux')) std_Extension.__init__(self, *args, **kwargs)
def __init__(self, name, project_dir=os.path.dirname(__file__)): Extension.__init__(self, name, sources=[]) self.project_dir = os.path.abspath(project_dir) self.build_dir = os.path.join(project_dir, 'build')
def __init__(self, name, sourcedir=''): Extension.__init__(self, name, sources=[]) self.sourcedir = os.path.abspath(sourcedir)
def __init__(self, *args, **kwargs): add_numpy(kwargs) add_boost_python(kwargs) Extension.__init__(self, *args, **kwargs)