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('')
评论列表
文章目录