forked from geofront-auth/geofront
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
126 lines (109 loc) · 3.86 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
from __future__ import with_statement
import operator
import os
import sys
from setuptools import setup, find_packages
from geofront.version import VERSION
def readme():
with open('README.rst') as f:
return f.read()
install_requires = [
'setuptools',
'typeguard >= 2.1.1, < 3.0.0',
'cryptography >= 1.4',
'gevent >= 1.1.2',
# indirect dependency thorugh paramiko; just for version constraint (>=1.4)
'paramiko >= 2.2.0',
'Werkzeug >= 0.11, < 0.14',
'oauthlib[rsa, signedtoken] >= 1.1.1, < 2.0.0',
'Flask >= 0.10.1',
'Flask-Sockets >= 0.2.1',
'apache-libcloud >= 1.1.0',
]
supported_pyversions = [(3, 3), (3, 4), (3, 5), (3, 6)]
pyversion_requires = {
('<', (3, 4)): ['singledispatch'],
('<', (3, 5)): ['typing'],
}
tests_require = [
'pytest >= 2.5.0',
'sftpserver >= 0.3',
'iso8601 >= 0.1.10',
'redis',
'pytest-cov'
]
docs_require = [
'Sphinx >= 1.2',
'sphinxcontrib-httpdomain >= 1.2.1',
'sphinxcontrib-autoprogram'
]
if sys.version_info < (3, 4):
tests_require.append('asyncio >= 0.4.1')
extras_require = {
'tests': tests_require,
'docs': docs_require,
}
# The current wheel version (0.24.0) doesn't seem to cover all comparison
# operators of PEP 426 except for ==, so we need to expand all other operators
# to multiple equals e.g. <=2.7 to ==2.6, ==2.7.
operators = {
'==': operator.eq, '!=': operator.ne, '<': operator.lt, '<=': operator.le,
'>': operator.gt, '>=': operator.ge
}
for (op, ver), packages in pyversion_requires.items():
for pyversion in supported_pyversions:
if operators[op](pyversion, ver):
extras_require.setdefault(
':python_version==' + repr('.'.join(map(str, pyversion))),
[]
).extend(packages)
# FIXME: Shitty hack... The current version of setuptools and pip
# doesn't support PEP 426, so we need to manually inject
# conditional requirements into install_requires.
# Note that injection must not be done for bdist_wheel since
# wheel statically captures all install_requires and then
# freezes them into JSON.
if 'bdist_wheel' not in sys.argv:
install_requires.extend(packages)
# Install requirements for documentation if it's run by ReadTheDocs.org
if os.environ.get('READTHEDOCS'):
install_requires.extend(docs_require)
setup(
name='Geofront',
version=VERSION,
description='Simple SSH key management service',
long_description=readme(),
url='https://github.com/spoqa/geofront',
author='Hong Minhee',
author_email='hongminhee' '@' 'member.fsf.org',
maintainer='Spoqa',
maintainer_email='dev' '@' 'spoqa.com',
license='AGPLv3 or later',
packages=find_packages(exclude=['tests']),
python_requires='>=3.3.0',
install_requires=install_requires,
tests_require=tests_require,
extras_require=extras_require,
entry_points='''
[console_scripts]
geofront-server = geofront.server:main
geofront-key-regen = geofront.regen:main
''',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved '
':: GNU Affero General Public License v3 or later (AGPLv3+)',
'Operating System :: POSIX',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.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 :: Application',
'Topic :: System :: Systems Administration :: Authentication/Directory'
]
)