-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
129 lines (107 loc) · 3.69 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
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
"""
setup module for falcon-marshmallow
"""
from os.path import dirname, join, realpath
from setuptools import setup, find_packages
from textwrap import dedent
NAME = 'falcon_marshmallow'
URL = 'https://www.github.com/ihiji/falcon-marshmallow'
AUTHOR = 'Matthew Planchard'
EMAIL = 'engineering@ihiji.com'
SHORT_DESC = 'Automatic Marshmallow (De)serialization in Falcon'
LONG_DESC = dedent(
"""
Falcon-Marshmallow is a middleware library designed to assist
developers who wish to easily incorporate automatic (de)serialization
using Marshmallow schemas into their Falcon application. Once
the middleware is in place, requests to any resources that have
a ``schema`` attribute defined will automatically use that schema
to parse the request body. In addition, responses for that resource
will automatically use the defined schema to dump results.
You may also specify method-specific schemas on a resource, e.g.
``patch_schema``, which will be used only when the request method
matches the schema prefix.
By default, this middleware will also automatically parse requests
and responses to JSON even if they do not have any schema(s) defined.
This can be easily disabled, if you would prefer to use your own JSON
parsing middleware. This is done using ``simplejson`` by default,
but you may specify any module or object you like that implements
the public interface of the standard library ``json`` module.
"""
)
KEYWORDS = [
'ihiji',
'falcon',
'marshmallow',
'marshalling',
'middleware',
'serialization',
'deserialization',
'json',
'wsgi',
]
PACKAGE_DEPENDENCIES = [
'falcon',
'marshmallow',
'simplejson',
'typing;python_version<"3.5"',
]
SETUP_DEPENDENCIES = [
'pytest-runner',
]
TEST_DEPENDENCIES = [
'pytest',
'pytest-cov',
'ipython<6;python_version<"3"',
'ipython;python_version>="3"',
'ipdb',
'mock;python_version<"3.3"',
]
EXTRAS_DEPENDENCIES = {}
PACKAGE_EXCLUDE = ['*.tests', '*.tests.*']
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for all
# available setup classifiers
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
# 'Development Status :: 4 - Beta',
# 'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
# 'License :: Other/Proprietary License',
'License :: OSI Approved :: MIT License',
# 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'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 :: Implementation :: CPython',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
]
__version__ = '0.0.0'
cwd = dirname(realpath(__file__))
with open(join(cwd, '%s/_version.py' % NAME)) as version_file:
for line in version_file:
# This will populate the __version__ and __version_info__ variables
if line.startswith('__'):
exec(line)
setup(
name=NAME,
version=__version__,
description=SHORT_DESC,
long_description=LONG_DESC,
url=URL,
author=AUTHOR,
author_email=EMAIL,
classifiers=CLASSIFIERS,
keywords=KEYWORDS,
packages=find_packages(exclude=PACKAGE_EXCLUDE),
install_requires=PACKAGE_DEPENDENCIES,
setup_requires=SETUP_DEPENDENCIES,
tests_require=TEST_DEPENDENCIES,
extras_require=EXTRAS_DEPENDENCIES,
)