-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
62 lines (50 loc) · 1.59 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
"""
probot
~~~~~~
Probot in Python
:copyright: (c) 2020 Flying Dice, LLC.
:license: Apache 2.0, see LICENSE for more details.
"""
import ast
import re
try:
from setuptools import find_packages, setup
except ImportError:
from distutils.core import setup
GLOBAL_REGEX = re.compile(r'(\w+)\s+=\s+(.*)')
def get_meta():
with open('probot/meta.py', 'r') as f:
matches = GLOBAL_REGEX.findall(f.read())
return dict((name.lower(), ast.literal_eval(value))
for (name, value) in matches)
def get_long_description():
with open('README.md') as f:
return f.read()
meta = get_meta()
setup(
name=meta['name'],
version=meta['version'],
author=meta['author'],
author_email=meta['author_email'],
url=meta['url'],
license=meta['license'],
description=meta['tagline'],
long_description=get_long_description(),
long_description_content_type='text/markdown',
packages=find_packages(),
package_data={'probot': ['py.typed']},
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)