码迷,mamicode.com
首页 > 编程语言 > 详细

Python打包分发工具setuptools

时间:2018-08-27 21:56:32      阅读:207      评论:0      收藏:0      [点我收藏+]

标签: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 < (3,):
        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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!