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


Python build_ext.inplace方法代码示例

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


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

示例1: initialize_options

# 需要导入模块: from distutils.command import build_ext [as 别名]
# 或者: from distutils.command.build_ext import inplace [as 别名]
def initialize_options(self):
        self.extensions = None
        self.package = None
        self.py_modules = None
        self.py_modules_dict = None
        self.build_src = None
        self.build_lib = None
        self.build_base = None
        self.force = None
        self.inplace = None
        self.package_dir = None
        self.f2pyflags = None # obsolete
        self.f2py_opts = None
        self.swigflags = None # obsolete
        self.swig_opts = None
        self.swig_cpp = None
        self.swig = None 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:19,代码来源:build_src.py

示例2: build_sources

# 需要导入模块: from distutils.command import build_ext [as 别名]
# 或者: from distutils.command.build_ext import inplace [as 别名]
def build_sources(self):

        if self.inplace:
            self.get_package_dir = \
                     self.get_finalized_command('build_py').get_package_dir

        self.build_py_modules_sources()

        for libname_info in self.libraries:
            self.build_library_sources(*libname_info)

        if self.extensions:
            self.check_extensions_list(self.extensions)

            for ext in self.extensions:
                self.build_extension_sources(ext)

        self.build_data_files_sources()
        self.build_npy_pkg_config() 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:21,代码来源:build_src.py

示例3: _build_npy_pkg_config

# 需要导入模块: from distutils.command import build_ext [as 别名]
# 或者: from distutils.command.build_ext import inplace [as 别名]
def _build_npy_pkg_config(self, info, gd):
        template, install_dir, subst_dict = info
        template_dir = os.path.dirname(template)
        for k, v in gd.items():
            subst_dict[k] = v

        if self.inplace == 1:
            generated_dir = os.path.join(template_dir, install_dir)
        else:
            generated_dir = os.path.join(self.build_src, template_dir,
                    install_dir)
        generated = os.path.basename(os.path.splitext(template)[0])
        generated_path = os.path.join(generated_dir, generated)
        if not os.path.exists(generated_dir):
            os.makedirs(generated_dir)

        subst_vars(generated_path, template, subst_dict)

        # Where to install relatively to install prefix
        full_install_dir = os.path.join(template_dir, install_dir)
        return full_install_dir, generated_path 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:23,代码来源:build_src.py

示例4: build_py_modules_sources

# 需要导入模块: from distutils.command import build_ext [as 别名]
# 或者: from distutils.command.build_ext import inplace [as 别名]
def build_py_modules_sources(self):
        if not self.py_modules:
            return
        log.info('building py_modules sources')
        new_py_modules = []
        for source in self.py_modules:
            if is_sequence(source) and len(source)==3:
                package, module_base, source = source
                if self.inplace:
                    build_dir = self.get_package_dir(package)
                else:
                    build_dir = os.path.join(self.build_src,
                                             os.path.join(*package.split('.')))
                if hasattr(source, '__call__'):
                    target = os.path.join(build_dir, module_base + '.py')
                    source = source(target)
                if source is None:
                    continue
                modules = [(package, module_base, source)]
                if package not in self.py_modules_dict:
                    self.py_modules_dict[package] = []
                self.py_modules_dict[package] += modules
            else:
                new_py_modules.append(source)
        self.py_modules[:] = new_py_modules 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:27,代码来源:build_src.py

示例5: _build_npy_pkg_config

# 需要导入模块: from distutils.command import build_ext [as 别名]
# 或者: from distutils.command.build_ext import inplace [as 别名]
def _build_npy_pkg_config(self, info, gd):
        import shutil
        template, install_dir, subst_dict = info
        template_dir = os.path.dirname(template)
        for k, v in gd.items():
            subst_dict[k] = v

        if self.inplace == 1:
            generated_dir = os.path.join(template_dir, install_dir)
        else:
            generated_dir = os.path.join(self.build_src, template_dir,
                    install_dir)
        generated = os.path.basename(os.path.splitext(template)[0])
        generated_path = os.path.join(generated_dir, generated)
        if not os.path.exists(generated_dir):
            os.makedirs(generated_dir)

        subst_vars(generated_path, template, subst_dict)

        # Where to install relatively to install prefix
        full_install_dir = os.path.join(template_dir, install_dir)
        return full_install_dir, generated_path 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:24,代码来源:build_src.py


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