forked from marrow/web.security
/
setup.py
executable file
·109 lines (92 loc) · 3.21 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
#!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
import os
import sys
import codecs
try:
from setuptools.core import setup, find_packages
except ImportError:
from setuptools import setup, find_packages
if sys.version_info < (2, 7):
raise SystemExit("Python 2.7 or later is required.")
elif sys.version_info > (3, 0) and sys.version_info < (3, 2):
raise SystemExit("Python 3.2 or later is required.")
version = description = url = author = None
exec(open(os.path.join("web", "security", "release.py")).read())
here = os.path.abspath(os.path.dirname(__file__))
tests_require = [
'pytest', # test collector and extensible runner
'pytest-cov', # coverage reporting
'pytest-flakes', # syntax validation
'pytest-capturelog', # log capture
'pytest-spec', # output formatting
'WebCore', # request mocking
'web.dispatch.object', # endpoint discovery
]
setup(
name = "web.security",
version = version,
description = description,
long_description = codecs.open(os.path.join(here, 'README.rst'), 'r', 'utf8').read(),
url = url,
download_url = 'https://github.com/marrow/web.security/releases',
author = author.name,
author_email = author.email,
license = 'MIT',
keywords = ['web.security', 'WebCore', 'ACL', 'CSRF', 'authentication', 'authorization', 'authn', 'authz', 'a12n', 'a11n'],
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
],
packages = find_packages(exclude=['example', 'test']),
include_package_data = True,
namespace_packages = [
'web', # primary namespace
'web.ext', # framework extensions
],
entry_points = {
'web.extension': [
'acl = web.ext.acl:ACLExtension', # Access control list validation.
],
'web.security.predicate': [
'not = web.security.predicate:Not',
'always = web.security.predicate:always',
'never = web.security.predicate:never',
'first = web.security.predicate:First',
'all = web.security.predicate:All',
'any = web.security.predicate:Any',
'matches = web.security.predicate:ContextMatch',
'contains = web.security.predicate:ContextContains',
],
},
setup_requires = [
'pytest-runner',
] if {'pytest', 'test', 'ptr'}.intersection(sys.argv) else [],
install_requires = [
'WebCore>=2.0.3,<2.2.0', # Web framework.
'marrow.package>=1.2,<1.3', # Plugin management.
],
extras_require = dict(
development = tests_require,
ecdsa = ['ecdsa'],
fastecdsa = ['fastecdsa>=1.0.3'],
),
tests_require = tests_require,
zip_safe = True,
)