1 Star 0 Fork 27

huangduirong/A-Tune-Collector

forked from openEuler/A-Tune-Collector 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
setup.py 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
liuke20 提交于 2020-12-08 16:11 . replace pandas with csv
import os
import shutil
from setuptools import setup, find_packages
from setuptools.command.install import install
from setuptools.command.test import test
version = '0.1'
class InstallScripts(install):
"""
install scripts
"""
def run(self):
install.run(self)
class TestCommand(test):
"""
test cases
"""
def run_tests(self):
os.system("py.test-%s %s" % (3, "tests"))
s = setup(name='atune_collector',
version=version,
description="The tool for data collection and analysis",
classifiers=[],
keywords='collection analysis',
url='',
license='MulanPSL-2.0',
packages=find_packages(".", exclude=['tests']),
data_files=[('/etc/atune_collector', ['atune_collector/collect_data.json',
'atune_collector/plugin/configurator/bootloader/grub2.json'])],
include_package_data=True,
zip_safe=False,
install_requires=['dict2xml'],
cmdclass={
'install': InstallScripts,
'test': TestCommand,
},
)
if 'install' in s.command_obj:
src_dir = "atune_collector/scripts"
dst_dir = os.path.join(s.command_obj['install'].install_lib, src_dir)
shutil.rmtree(dst_dir, ignore_errors=True)
shutil.copytree(src_dir, dst_dir)
os.system("chmod -R 750 %s" % dst_dir)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huangduirong/A-Tune-Collector.git
git@gitee.com:huangduirong/A-Tune-Collector.git
huangduirong
A-Tune-Collector
A-Tune-Collector
master

搜索帮助