-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
84 lines (80 loc) · 2.56 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
# Copyright (c) 2018 - 2021 TomTom N.V.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from setuptools import setup
import re
with open('README.md', encoding='UTF-8') as fh:
long_description = fh.read()
# Extract first paragraph
description = re.sub(r'^\s*(?:#+[^\n]*\s*)*', r'', long_description, count=1, flags=re.DOTALL|re.MULTILINE)
description = re.sub(r'\n\n.*', r'', description, flags=re.DOTALL|re.MULTILINE)
# Eliminate link annotation
description = re.sub(r'\[([^\]]+)\]', r'\1', description)
# Convert line breaks into spaces
description = description.replace('\n', ' ')
setup(
name='commisery',
author='TomTom N.V.',
description=description,
long_description=long_description,
long_description_content_type='text/markdown',
packages=('commisery','commisery.cli'),
py_modules=('commisery',),
python_requires='>=3.6.5',
install_requires=(
'click>=7.1.2,<9',
'click-log',
'GitPython>=3,<4',
'regex',
'PyYAML',
'stemming>=1,<2',
'dataclasses>=0.8,<1; python_version < "3.7.0"',
'llvm-diagnostics>=3.0.0,<4',
'inquirer2==1.0.0',
),
setup_requires=(
'pytest-runner',
'setuptools_scm',
'setuptools_scm_git_archive',
),
tests_require=(
'pytest',
),
extras_require={
'github': [
'PyGithub>=1.53,<2',
],
},
use_scm_version={"relative_to": __file__},
entry_points={
'console_scripts': [
'cm = commisery.cli:main',
'commisery = commisery.cli:main',
'commisery-verify-msg = commisery.cli:check',
'commisery-verify-github-pullrequest = commisery.github:main [github]',
],
'hopic.plugins.yaml': [
'commisery = commisery.hopic_template:commisery',
],
},
zip_safe=True,
url='https://github.com/tomtom-international/commisery',
project_urls={
'Source Code': 'https://github.com/tomtom-international/commisery',
},
classifiers=(
'License :: OSI Approved :: Apache Software License',
),
license='Apache License 2.0',
license_file='LICENSE',
)