make.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:pytzdata 作者: sdispater 项目源码 文件源码
def build(self):
        self.line('[<comment>Building tzdata</>]')
        dest_path = os.path.join(self.path, 'tz')

        # Getting VERSION
        with open(os.path.join(dest_path, 'version')) as f:
            version = f.read().strip()

        self.write('<comment>Building</> version <fg=cyan>{}</>'.format(version))
        os.chdir(dest_path)

        with open(os.devnull, 'w') as temp:
            subprocess.call(
                ['make', 'TOPDIR={}'.format(dest_path), 'install'],
                stdout=temp,
                stderr=temp
            )

        self.overwrite('<info>Built</> version <fg=cyan>{}</>'.format(version))
        self.line('')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号