Python pip 模块,wheel() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用pip.wheel()

项目:setuptools-pkg    作者:kxepal    | 项目源码 | 文件源码
def build_and_install_via_wheel(self):
        if not wheel_available:
            raise RuntimeError('The `wheel` package is not available.')
        build = self.reinitialize_command('build', reinit_subcommands=1)
        build.build_base = self.bdist_base
        bdist_wheel = self.reinitialize_command(
            'bdist_wheel',
            reinit_subcommands=1
        )
        bdist_wheel.bdist_base = self.bdist_base
        bdist_wheel.keep_temp = True
        self.run_command('bdist_wheel')
        name = self.distribution.get_name()
        pip.wheel.move_wheel_files(
            name=self.name,
            req=WhlRequirement.parse('{}=={}'.format(name, self.version)),
            wheeldir=bdist_wheel.bdist_dir,
            root=self.install_dir,
            prefix=self.prefix,
        )