-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
62 lines (54 loc) · 2.09 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
# -*- coding: utf-8 -*-
# Created by restran on 2017/7/27
from __future__ import unicode_literals
import sys
from future.utils import bytes_to_native_str
from setuptools import setup, find_packages
from mountains import __version__
kwargs = {
'packages': find_packages(),
# 还需要创建一个 MANIFEST.in 的文件,然后将这些数据也放在那里
# package_data 添加了配置,Python2会报错
'package_data': {}
}
install_requires = [
'requests',
'simplejson',
'colorlog'
]
if sys.version_info < (3, 0):
install_requires.append('futures')
kwargs['install_requires'] = install_requires
readme_file = 'README.md'
long_description = open(readme_file, 'rb').read()
setup(
name='mountains', # 文件名
version=__version__, # 版本(每次更新上传 pypi 需要修改)
description="a util collection for python developing",
long_description=bytes_to_native_str(long_description), # 放README.md文件,方便在 pypi 页展示
long_description_content_type='text/markdown',
classifiers=[
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
], # Get strings from http://pypi.python.org/pypi?:action=list_classifiers
keywords='python utils', # 关键字
author='restran', # 用户名
author_email='grestran@gmail.com', # 邮箱
url='https://github.com/restran/mountains', # github上的地址
license='MIT', # 遵循的协议
include_package_data=True,
zip_safe=True,
platforms='any',
**kwargs
)