当前位置: 首页>>代码示例>>Python>>正文


Python build_ext.finalize_options方法代码示例

本文整理汇总了Python中distutils.command.build_ext.build_ext.finalize_options方法的典型用法代码示例。如果您正苦于以下问题:Python build_ext.finalize_options方法的具体用法?Python build_ext.finalize_options怎么用?Python build_ext.finalize_options使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在distutils.command.build_ext.build_ext的用法示例。


在下文中一共展示了build_ext.finalize_options方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: finalize_options

# 需要导入模块: from distutils.command.build_ext import build_ext [as 别名]
# 或者: from distutils.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        if self.parallel:
            try:
                self.parallel = int(self.parallel)
            except ValueError:
                raise ValueError("--parallel/-j argument must be an integer")

        # Ensure that self.include_dirs and self.distribution.include_dirs
        # refer to the same list object. finalize_options will modify
        # self.include_dirs, but self.distribution.include_dirs is used
        # during the actual build.
        # self.include_dirs is None unless paths are specified with
        # --include-dirs.
        # The include paths will be passed to the compiler in the order:
        # numpy paths, --include-dirs paths, Python include path.
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)
        incl_dirs = self.include_dirs or []
        if self.distribution.include_dirs is None:
            self.distribution.include_dirs = []
        self.include_dirs = self.distribution.include_dirs
        self.include_dirs.extend(incl_dirs)

        old_build_ext.finalize_options(self)
        self.set_undefined_options('build', ('parallel', 'parallel')) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:27,代码来源:build_ext.py

示例2: finalize_options

# 需要导入模块: from distutils.command.build_ext import build_ext [as 别名]
# 或者: from distutils.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        build_ext.finalize_options(self)
        if self.debug:
            global DEBUG
            DEBUG = True
        if sys.version_info.major >= 3 and not self.parallel:
            # For Python 2.7, we monkeypatch distutils to have parallel
            # builds. If --parallel (or -j) wasn't specified, we want to
            # reproduce the same behavior as before, that is, auto-detect the
            # number of jobs.
            self.parallel = mp_compile.MAX_PROCS
        for x in self.feature:
            if getattr(self, 'disable_%s' % x):
                setattr(self.feature, x, False)
                self.feature.required.discard(x)
                _dbg('Disabling %s', x)
                if getattr(self, 'enable_%s' % x):
                    raise ValueError(
                        'Conflicting options: --enable-%s and --disable-%s' %
                        (x, x))
            if getattr(self, 'enable_%s' % x):
                _dbg('Requiring %s', x)
                self.feature.required.add(x) 
开发者ID:holzschu,项目名称:python3_ios,代码行数:25,代码来源:setup.py

示例3: finalize_options

# 需要导入模块: from distutils.command.build_ext import build_ext [as 别名]
# 或者: from distutils.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        self.set_undefined_options('config',
                                   ('q_home', 'q_home'),
                                   ('q_arch', 'q_arch'),
                                   ('q_version', 'q_version'))
        self.set_undefined_options('build',
                                   ('build_base', 'build_base'),
                                   ('compiler', 'compiler'),
                                   ('debug', 'debug'),
                                   ('force', 'force'),
                                   ('plat_name', 'plat_name'))
        if self.build_lib is None:
            self.build_lib = os.path.join(self.build_base,
                                          'qext.' + self.plat_name)
        if self.build_temp is None:
            self.build_temp = os.path.join(self.build_base,
                                           'temp.' + self.plat_name)
        if self.extensions is None:
            self.extensions = self.distribution.qext_modules
        if self.define is None:
            split_version = self.q_version.split('.')
            self.define = [('KXVER', split_version[0]),
                           ('KXVER2', split_version[1]), ] 
开发者ID:KxSystems,项目名称:pyq,代码行数:25,代码来源:setup.py

示例4: finalize_options

# 需要导入模块: from distutils.command.build_ext import build_ext [as 别名]
# 或者: from distutils.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        # Ensure that self.include_dirs and self.distribution.include_dirs
        # refer to the same list object. finalize_options will modify
        # self.include_dirs, but self.distribution.include_dirs is used
        # during the actual build.
        # self.include_dirs is None unless paths are specified with
        # --include-dirs.
        # The include paths will be passed to the compiler in the order:
        # numpy paths, --include-dirs paths, Python include path.
        if isinstance(self.include_dirs, str):
            self.include_dirs = self.include_dirs.split(os.pathsep)
        incl_dirs = self.include_dirs or []
        if self.distribution.include_dirs is None:
            self.distribution.include_dirs = []
        self.include_dirs = self.distribution.include_dirs
        self.include_dirs.extend(incl_dirs)
        old_build_ext.finalize_options(self) 
开发者ID:pfchai,项目名称:ImageFusion,代码行数:19,代码来源:build_ext.py

示例5: finalize_options

# 需要导入模块: from distutils.command.build_ext import build_ext [as 别名]
# 或者: from distutils.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options (self):
            if self.library_dirs is None:
                self.library_dirs = []
            elif isinstance(self.library_dirs, basestring):
                self.library_dirs = self.library_dirs.split(os.pathsep)
            
            self.library_dirs.insert(0, os.path.join(sys.real_prefix, "Libs"))
            old_build_ext.finalize_options(self) 
开发者ID:awemulya,项目名称:kobo-predict,代码行数:10,代码来源:__init__.py

示例6: finalize_options

# 需要导入模块: from distutils.command.build_ext import build_ext [as 别名]
# 或者: from distutils.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        incl_dirs = self.include_dirs
        old_build_ext.finalize_options(self)
        if incl_dirs is not None:
            self.include_dirs.extend(self.distribution.include_dirs or []) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:7,代码来源:build_ext.py

示例7: finalize_options

# 需要导入模块: from distutils.command.build_ext import build_ext [as 别名]
# 或者: from distutils.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
            if self.library_dirs is None:
                self.library_dirs = []
            elif isinstance(self.library_dirs, basestring):
                self.library_dirs = self.library_dirs.split(os.pathsep)

            self.library_dirs.insert(0, os.path.join(sys.real_prefix, "Libs"))
            old_build_ext.finalize_options(self) 
开发者ID:QData,项目名称:deepWordBug,代码行数:10,代码来源:__init__.py

示例8: finalize_options

# 需要导入模块: from distutils.command.build_ext import build_ext [as 别名]
# 或者: from distutils.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        _build_ext.finalize_options(self)
        # The argument parsing will result in self.define being a string, but
        # it has to be a list of 2-tuples.
        # Multiple symbols can be separated with semi-colons.
        self.define = _process_define(self)
        cmake_opts.extend(self.define)
        if self.symengine_dir:
            cmake_opts.extend([('SymEngine_DIR', self.symengine_dir)])

        if self.generator:
            cmake_generator[0] = self.generator

        cmake_build_type[0] = self.build_type 
开发者ID:symengine,项目名称:symengine.py,代码行数:16,代码来源:setup.py


注:本文中的distutils.command.build_ext.build_ext.finalize_options方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。