python类develop()的实例源码

setup.py 文件源码 项目:nnmnkwii 作者: r9y9 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def run(self):
        build_py.create_version_file()
        setuptools.command.develop.develop.run(self)
setup.py 文件源码 项目:pytorch 作者: tylergenter 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def run(self):
        build_py.create_version_file()
        setuptools.command.develop.develop.run(self)
setup.py 文件源码 项目:pytorch-coriander 作者: hughperkins 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def run(self):
        build_py.create_version_file()
        setuptools.command.develop.develop.run(self)
setup.py 文件源码 项目:pytorch 作者: ezyang 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def run(self):
        build_py.create_version_file()
        setuptools.command.develop.develop.run(self)
setup.py 文件源码 项目:pytorch 作者: pytorch 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def run(self):
        build_py.create_version_file()
        setuptools.command.develop.develop.run(self)
        self.create_compile_commands()
setup.py 文件源码 项目:pytorch 作者: pytorch 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def create_compile_commands(self):
        def load(filename):
            with open(filename) as f:
                return json.load(f)
        ninja_files = glob.glob('build/*_compile_commands.json')
        cmake_files = glob.glob('torch/lib/build/*/compile_commands.json')
        all_commands = [entry
                        for f in ninja_files + cmake_files
                        for entry in load(f)]
        with open('compile_commands.json', 'w') as f:
            json.dump(all_commands, f, indent=2)
        if not WITH_NINJA:
            print("WARNING: 'develop' is not building C++ code incrementally")
            print("because ninja is not installed. Run this to enable it:")
            print(" > pip install ninja")


问题


面经


文章

微信
公众号

扫码关注公众号