17 Star 0 Fork 3

openKylin/update-manager

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup.py 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
LLL 提交于 2022-07-13 17:41 . Import Upstream version 20.04.10
#!/usr/bin/env python3
# -*- Mode: Python; indent-tabs-mode: nil; tab-width: 4; coding: utf-8 -*-
import os
import glob
from distutils.core import setup
from subprocess import check_output
from DistUtilsExtra.command import (
build_extra, build_i18n, build_help)
disabled = []
def plugins():
return []
return [os.path.join('janitor/plugincore/plugins', name)
for name in os.listdir('janitor/plugincore/plugins')
if name.endswith('_plugin.py') and name not in disabled]
for line in check_output('dpkg-parsechangelog --format rfc822'.split(),
universal_newlines=True).splitlines():
header, colon, value = line.lower().partition(':')
if header == 'version':
version = value.strip()
break
else:
raise RuntimeError('No version found in debian/changelog')
class CustomBuild(build_extra.build_extra):
def run(self):
with open("UpdateManager/UpdateManagerVersion.py", "w") as f:
f.write("VERSION = '%s'\n" % version)
build_extra.build_extra.run(self)
setup(name='update-manager',
version=version,
packages=['UpdateManager',
'UpdateManager.backend',
'UpdateManager.Core',
'HweSupportStatus',
'janitor',
'janitor.plugincore',
],
scripts=['update-manager',
'ubuntu-security-status',
'hwe-support-status'
],
data_files=[('share/update-manager/gtkbuilder',
glob.glob("data/gtkbuilder/*.ui")
),
('share/man/man8',
glob.glob('data/*.8')
),
('share/GConf/gsettings/',
['data/update-manager.convert']),
],
cmdclass={"build": CustomBuild,
"build_i18n": build_i18n.build_i18n,
"build_help": build_help.build_help}
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openkylin/update-manager.git
[email protected]:openkylin/update-manager.git
openkylin
update-manager
update-manager
openkylin/yangtze

搜索帮助