Python打包分发工具setuptools
2021-07-12 22:07
标签:PyYAML pack scripts lint code setup return ado class Python打包分发工具setuptools 标签:PyYAML pack scripts lint code setup return ado class 原文地址:https://www.cnblogs.com/wenlin-gk/p/9544030.htmlimport sys
import platform
from setuptools import setup, find_packages
def get_test_deps():
test_deps = [
‘pylint == 1.7.2‘,
‘mock == 2.0.0‘,
‘pytest-xdist‘
]
if sys.version_info ,):
test_deps.append(‘futures == 3.1.1‘)
return test_deps
def get_data_files1():
if platform.system() != ‘Linux‘:
return None
return [
(‘/etc/aidfs.aip‘, [‘readme.txt‘]),
(‘/etc/aidfs.aip/config‘, [‘cfg/aidfs/config/aidfs.yaml‘])
]
test_deps = get_test_deps()
extras = {‘test‘: test_deps}
install_requires = [
‘tornado == 4.5.2‘,
‘click == 6.7‘,
‘PyYAML == 3.10‘,
‘urllib3 == 1.22‘,
‘threadpool == 1.3.2‘
]
entry_points = {
‘console_scripts‘: [
‘aidfs = src.cmd.aidfs:cli‘
]
}
setup(
name=‘aidfs‘,
version=‘1.0.0‘,
packages=find_packages(),
include_package_data=True,
install_requires=install_requires,
tests_require=test_deps,
extras_require=extras,
data_files=get_data_files1(),
entry_points=entry_points,
author="ZTE",
author_email="ai@zte.com.cn",
description=""
)
文章标题:Python打包分发工具setuptools
文章链接:http://soscw.com/index.php/essay/104354.html