forked from bbangert/beaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
112 lines (97 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
import os
import sys
import re
import inspect
from setuptools import setup, find_packages
py_version = sys.version_info[:2]
here = os.path.abspath(os.path.dirname(__file__))
v = open(os.path.join(here, 'beaker', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
try:
README = open(os.path.join(here, 'README.rst')).read()
except IOError:
README = ''
INSTALL_REQUIRES = []
if not hasattr(inspect, 'signature'):
# On Python 2.6, 2.7 and 3.2 we need funcsigs dependency
INSTALL_REQUIRES.append('funcsigs')
TESTS_REQUIRE = ['pytest', 'Mock', 'pycryptodome']
if py_version == (2, 6):
TESTS_REQUIRE.append('WebTest<2.0.24')
TESTS_REQUIRE.append('pycparser==2.18')
else:
TESTS_REQUIRE.append('webtest')
if py_version == (3, 2):
TESTS_REQUIRE.append('coverage < 4.0')
else:
TESTS_REQUIRE.append('coverage')
if py_version == (3, 3):
TESTS_REQUIRE.append('cryptography < 2.1.0')
else:
TESTS_REQUIRE.append('cryptography')
if not sys.platform.startswith('java') and not sys.platform == 'cli':
if py_version == (2, 6):
TESTS_REQUIRE.append('sqlalchemy < 1.2')
else:
TESTS_REQUIRE.append('sqlalchemy')
TESTS_REQUIRE.extend(['pymongo', 'redis'])
try:
import sqlite3
except ImportError:
TESTS_REQUIRE.append('pysqlite')
TESTS_REQUIRE.extend(['pylibmc', 'python-memcached'])
setup(name='Beaker',
version=VERSION,
description="A Session and Caching library with WSGI Middleware",
long_description=README,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'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 :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
],
keywords='wsgi myghty session web cache middleware',
author='Ben Bangert, Mike Bayer, Philip Jenvey, Alessandro Molina',
url='https://beaker.readthedocs.io/',
license='BSD',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests', 'tests.*']),
zip_safe=False,
install_requires=INSTALL_REQUIRES,
extras_require={
'crypto': ['pycryptopp>=0.5.12'],
'pycrypto': ['pycrypto'],
'pycryptodome': ['pycryptodome'],
'cryptography': ['cryptography'],
'testsuite': [TESTS_REQUIRE]
},
test_suite='tests',
tests_require=TESTS_REQUIRE,
entry_points="""
[paste.filter_factory]
beaker_session = beaker.middleware:session_filter_factory
[paste.filter_app_factory]
beaker_session = beaker.middleware:session_filter_app_factory
[beaker.backends]
database = beaker.ext.database:DatabaseNamespaceManager
memcached = beaker.ext.memcached:MemcachedNamespaceManager
google = beaker.ext.google:GoogleNamespaceManager
sqla = beaker.ext.sqla:SqlaNamespaceManager
"""
)