-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
85 lines (75 loc) · 2.16 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python
# encoding: utf-8
"""
@author: Wayne
@contact: [email protected]
@software: PyCharm
@file: setup
@time: 2020/3/10 14:38
"""
import setuptools
from pywayne.__version__ import __version__
with open("README.md", "r") as fh:
long_description = fh.read()
def parse_requirements(filename):
""" load requirements from a pip requirements file """
lineiter = (line.strip() for line in open(filename))
return [line for line in lineiter if line and not line.startswith("#") and not line.startswith("~")]
# 解析所有依赖
all_reqs = parse_requirements('requirements.txt')
# 定义核心依赖
core_reqs = [
"ipdb",
"natsort",
"sortedcontainers",
"tqdm",
"numpy",
"pandas",
"matplotlib",
"scipy",
"configparser",
"setuptools",
"filelock",
"pyyaml",
"requests",
]
# 定义可选依赖
optional_reqs = [req for req in all_reqs if req not in core_reqs]
setuptools.setup(
name="pywayne",
version=__version__,
author="Wayne",
author_email="[email protected]",
description="Some useful tools",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/wangyendt/wangye_algorithm_lib",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
dependency_links=[
'https://pypi.tuna.tsinghua.edu.cn/simple/',
'http://mirrors.aliyun.com/pypi/simple/',
'http://pypi.douban.com/simple/',
'https://pypi.python.org/simple',
'https://pypi.mirrors.ustc.edu.cn/simple/',
],
install_requires=core_reqs,
extras_require={
'full': optional_reqs,
'gui': ["easygui", "pynput"],
'image': ["pillow"],
'aws': ["boto3", "botocore"],
'data': ["h5py", "seaborn", "pyperclip"],
'geo': ["concave_hull", "alphashape", "shapely"],
'bot': ["lark-oapi", 'gtts']
},
packages=setuptools.find_packages(),
python_requires='>=3',
scripts=[
'bin/gettool', # shell script
'bin/gettool.py' # python script
]
)