Python打包分发工具setuptools

2021-07-12 22:07

阅读:510

标签:PyYAML   pack   scripts   lint   code   setup   return   ado   class   

import 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

标签:PyYAML   pack   scripts   lint   code   setup   return   ado   class   

原文地址:https://www.cnblogs.com/wenlin-gk/p/9544030.html


评论


亲,登录后才可以留言!