-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
89 lines (78 loc) · 2.88 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
86
87
88
89
# encoding=utf8
"""打包配置"""
from setuptools import find_packages, setup
VERSION_SUFFIX_DEV = 'dev'
VERSION_SUFFIX_POST = 'post'
VERSION_SUFFIX_ALPHA = 'a'
VERSION_SUFFIX_BETA = 'b'
VERSION_SUFFIX_RC = 'rc'
VERSION_SUFFIX_NONE = None
VERSION = (1, 1, 0, VERSION_SUFFIX_NONE, 0)
def get_setup_version():
"""
获取打包使用的版本号,符合 PYPI 官方推荐的版本号方案
:return: PYPI 打包版本号
:rtype: str
"""
ver = '.'.join(map(str, VERSION[:3]))
# 若后缀描述字串为 None ,则直接返回主版本号
if not VERSION[3]:
return ver
# 否则,追加版本号后缀
hyphen = ''
suffix = hyphen.join(map(str, VERSION[-2:]))
if VERSION[3] in [VERSION_SUFFIX_DEV, VERSION_SUFFIX_POST]:
hyphen = '.'
ver = hyphen.join([ver, suffix])
return ver
setup(
name='moprofiler',
url='https://github.com/littlemo/moprofiler',
author='littlemo',
author_email='[email protected]',
maintainer='littlemo',
maintainer_email='[email protected]',
version=get_setup_version(),
description='综合性能分析工具,集成了内存使用、执行时间的分析器,及秒表打点工具',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
keywords='moprofiler profiler tool memory time',
packages=find_packages('source'),
package_dir={'': 'source'},
include_package_data=True,
zip_safe=False,
license='GPLv3',
python_requires='>=2.7',
project_urls={
'Documentation': 'http://moprofiler.rtfd.io/',
'Source': 'https://github.com/littlemo/moprofiler',
'Tracker': 'https://github.com/littlemo/moprofiler/issues',
},
install_requires=open('requirements/pip.txt').read().splitlines(),
entry_points={},
# https://pypi.org/classifiers/
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: MacOS X',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: Chinese (Simplified)',
'Operating System :: MacOS',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Topic :: Communications :: Email',
'Topic :: Documentation :: Sphinx',
'Topic :: Software Development :: Testing :: Unit',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: User Interfaces',
'Topic :: Software Development :: Version Control :: Git',
'Topic :: Terminals',
'Topic :: Text Editors :: Emacs',
'Topic :: Utilities',
],
)