-
Notifications
You must be signed in to change notification settings - Fork 27
/
setup.py
executable file
·148 lines (124 loc) · 4.08 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/usr/bin/python
#
# Copyright (C) 2015 Custodia project Contributors, for licensee see COPYING
from __future__ import print_function
import os
import setuptools
from setuptools import Command, setup
SETUPTOOLS_VERSION = tuple(int(v) for v in setuptools.__version__.split("."))
class Version(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
print(self.distribution.metadata.version)
about = {}
with open(os.path.join('src', 'custodia', '__about__.py')) as f:
exec(f.read(), about)
requirements = [
'cryptography',
'jwcrypto >= 1.4.0',
'six',
'requests',
]
# extra requirements
gssapi_requires = ['requests-gssapi']
ipa_requires = [
'ipalib >= 4.5.0',
'ipaclient >= 4.5.0',
]
# test requirements
test_requires = ['coverage', 'pytest']
test_extras_requires = test_requires + gssapi_requires + ipa_requires
extras_require = {
'gssapi': gssapi_requires,
'ipa': ipa_requires,
'test': test_requires,
'test_extras': test_extras_requires,
'test_docs': ['docutils', 'markdown', 'sphinx-argparse',
'sphinxcontrib-spelling'] + ipa_requires,
'test_pep8': ['flake8', 'flake8-import-order', 'pep8-naming'],
'test_pylint': ['pylint'] + test_extras_requires,
}
with open('README') as f:
long_description = f.read()
# Plugins
custodia_authenticators = [
'IPAInterface = custodia.ipa.interface:IPAInterface',
'SimpleCredsAuth = custodia.httpd.authenticators:SimpleCredsAuth',
'SimpleHeaderAuth = custodia.httpd.authenticators:SimpleHeaderAuth',
'SimpleAuthKeys = custodia.httpd.authenticators:SimpleAuthKeys',
('SimpleClientCertAuth = '
'custodia.httpd.authenticators:SimpleClientCertAuth'),
]
custodia_authorizers = [
'SimplePathAuthz = custodia.httpd.authorizers:SimplePathAuthz',
'UserNameSpace = custodia.httpd.authorizers:UserNameSpace',
'KEMKeysStore = custodia.message.kem:KEMKeysStore',
]
custodia_clients = [
'KEMClient = custodia.client:CustodiaKEMClient',
'SimpleClient = custodia.client:CustodiaSimpleClient',
]
custodia_consumers = [
'Forwarder = custodia.forwarder:Forwarder',
'Secrets = custodia.secrets:Secrets',
'Root = custodia.root:Root',
]
custodia_stores = [
'EncryptedOverlay = custodia.store.encgen:EncryptedOverlay',
'EncryptedStore = custodia.store.enclite:EncryptedStore',
'IPAVault = custodia.ipa.vault:IPAVault',
'IPACertRequest = custodia.ipa.certrequest:IPACertRequest',
'SqliteStore = custodia.store.sqlite:SqliteStore',
]
setup(
name=about['__title__'],
version=about['__version__'],
description=about['__summary__'],
long_description=long_description,
license=about['__license__'],
url=about['__uri__'],
author=about['__author__'],
author_email=about['__email__'],
maintainer=about['__author__'],
maintainer_email=about['__email__'],
namespace_packages=['custodia'],
package_dir={'': 'src'},
packages=[
'custodia',
'custodia.cli',
'custodia.httpd',
'custodia.ipa',
'custodia.message',
'custodia.server',
'custodia.store',
],
entry_points={
'console_scripts': [
'custodia = custodia.server:main',
'custodia-cli = custodia.cli:main',
],
'custodia.authenticators': custodia_authenticators,
'custodia.authorizers': custodia_authorizers,
'custodia.clients': custodia_clients,
'custodia.consumers': custodia_consumers,
'custodia.stores': custodia_stores,
},
cmdclass={'version': Version},
classifiers=[
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Intended Audience :: Developers',
'Topic :: Security',
'Topic :: Software Development :: Libraries :: Python Modules'
],
install_requires=requirements,
tests_require=test_requires,
extras_require=extras_require,
python_requires='>=3.6',
)