-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·161 lines (154 loc) · 5.92 KB
/
setup.py
File metadata and controls
executable file
·161 lines (154 loc) · 5.92 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# snippy - software development and maintenance notes manager.
# Copyright 2017-2020 Heikki J. Laaksonen <laaksonen.heikki.j@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""setup: Install Snippy tool."""
import io
import os
from setuptools import setup, find_packages
REQUIRES = (
'colorama ; sys_platform == "win32"',
'importlib_metadata ; python_version!="3.4"', # To get tox to install in Python 3.4.
'importlib_metadata==0.23 ; python_version=="3.4"', # To get tox to install in Python 3.4.
'pyyaml ; python_version!="3.4"',
'pyyaml<=5.2 ; python_version=="3.4"',
)
EXTRAS_SERVER = (
'falcon==2.0.0',
'gunicorn==19.10.0 ; python_version<="3.3"',
'gunicorn==20.0.4 ; python_version>="3.4"',
'jsonschema==3.2.0',
'psycopg2==2.8.5 ; platform_python_implementation=="CPython"',
'psycopg2cffi==2.8.1 ; platform_python_implementation=="PyPy"',
)
EXTRAS_DEV = (
'colorama ; python_version!="3.4"', # To get openapi2jsonschema to install in Python 3.4.
'colorama==0.4.1 ; python_version=="3.4"', # To get openapi2jsonschema to install in Python 3.4.
'openapi2jsonschema==0.9.0 ; python_version<="3.6"',
'openapi2jsonschema==0.9.1 ; python_version>="3.7"',
)
EXTRAS_DOCS = (
'sphinx==1.8.5 ; python_version<="3.4"',
'sphinx==3.0.0 ; python_version>="3.5"',
'sphinxcontrib-openapi==0.6.0',
'sphinx_rtd_theme==0.4.3',
'sphinx-autobuild==0.7.1',
)
EXTRAS_RELEASE = (
'readme-renderer ; python_version!="3.4"', # To get twine to install in Python3.4.
'readme-renderer<25.0 ; python_version=="3.4"', # To get twine to install in Python3.4.
'setuptools',
'twine ; python_version!="3.4"',
'twine<2.0.0 ; python_version=="3.4"',
'wheel',
)
EXTRAS_TEST = (
'bandit==1.6.2',
'docker==4.2.0 ; python_version=="2.7.*" or python_version>="3.5"',
'docker==3.7.3 ; python_version=="3.4.*"',
'flake8==3.7.9',
'logging_tree==1.8.1',
'mock==3.0.5 ; python_version<="3.5"',
'mock==4.0.2 ; python_version>="3.6"',
'pluggy==0.13.1',
'pprintpp==0.4.0',
'pyflakes==2.1.1',
'pylint==1.9.5 ; python_version=="2.7.*"',
'pylint==2.3.1 ; python_version=="3.4.*"',
'pylint==2.4.4 ; python_version>="3.5"',
'pytest==4.6.9 ; python_version<="3.4"',
'pytest==5.4.1 ; python_version>="3.5"',
'pytest-cov==2.8.1',
'pytest-mock==2.0.0 ; python_version<="3.4"',
'pytest-mock==3.0.0 ; python_version>="3.5"',
'pytest-xdist==1.31.0',
'requests',
'tox==3.14.6 ; python_version=="2.7.*" or python_version>="3.5"',
'tox==3.14.0 ; python_version=="3.4.*"',
)
META = {}
HERE = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(HERE, 'snippy', 'meta.py'), mode='r', encoding='utf-8') as f:
exec(f.read(), META) # pylint: disable=exec-used
with io.open('README.rst', mode='r', encoding='utf-8') as f:
README = f.read()
setup(
name=META['__title__'],
version=META['__version__'],
description=META['__description__'],
long_description=README,
long_description_content_type='text/x-rst',
author=META['__author__'],
author_email=META['__email__'],
url=META['__homepage__'],
license=META['__license__'],
keywords='notes markdown yaml text command-line cli server backend docker software-engineering',
packages=find_packages(exclude=['tests', 'tests.lib']),
package_dir={'snippy': 'snippy'},
package_data={
'snippy': [
'data/completion/*',
'data/defaults/*',
'data/server/openapi/schema/*',
'data/storage/*',
'data/templates/*'
]
},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
install_requires=REQUIRES,
zip_safe=False,
entry_points={
'console_scripts': [
'snippy = snippy.snip:main'
],
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
'Natural Language :: English',
'Operating System :: MacOS',
'Operating System :: Microsoft',
'Operating System :: POSIX :: Linux',
'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 :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Documentation',
'Topic :: Utilities'
],
extras_require={
'devel': EXTRAS_DEV + EXTRAS_DOCS + EXTRAS_SERVER + EXTRAS_TEST,
'docs': EXTRAS_DOCS,
'release': EXTRAS_RELEASE,
'server': EXTRAS_SERVER,
'test': EXTRAS_SERVER + EXTRAS_TEST,
},
platforms=["Linux", "MacOS", "Microsoft"],
tests_require=EXTRAS_TEST,
test_suite='tests'
)