forked from youknowone/ring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
122 lines (107 loc) · 2.83 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
from __future__ import with_statement
from setuptools import setup
import sys
def get_version():
with open('ring/__version__.py') as f:
empty, version = f.read().split('__version__ = ')
assert empty == ''
version = version.strip().strip("'")
assert version.startswith('0.')
return version
install_requires = [
'six>=1.11.0',
'wirerope>=0.2.0',
]
tests_require = [
'pytest>=3.6', 'pytest-cov', 'pytest-lazy-fixture', 'mock', 'patch',
'pymemcache',
'redis', 'requests',
'diskcache',
'django',
]
docs_require = [
'sphinx',
'django',
]
try:
import __pypy__ # noqa
except ImportError:
# CPython-only
tests_require.extend([
'pylibmc',
])
# new feature support
if (3, 3) <= sys.version_info:
if sys.version_info < (3, 5):
tests_require.append('pytest-asyncio==0.5.0')
else:
tests_require.append('pytest-asyncio')
tests_require.extend([
'aiomcache',
'aioredis>=1.0.0',
])
if sys.version_info[0] == 2:
tests_require.extend([
'python-memcached',
])
else:
tests_require.extend([
'python3-memcached',
])
# backports - py2
if sys.version_info[0] == 2:
install_requires.extend([
'inspect2>=0.1.0',
'functools32>=3.2.3-2',
])
# backports - py34
if sys.version_info[:2] <= (3, 4):
install_requires.extend([
'typing>=3.6.4',
])
if (3, 3) <= sys.version_info[:2]:
install_requires.extend([
'asyncio>=3.4.3',
])
dev_require = tests_require + docs_require
def get_readme():
try:
with open('README.rst') as f:
return f.read().strip()
except IOError:
return ''
setup(
name='ring',
version=get_version(),
description='Function-oriented cache interface with built-in memcache '
'& redis + asyncio support.',
long_description=get_readme(),
author='Jeong YunWon',
author_email='[email protected]',
url='https://github.com/youknowone/ring',
packages=(
'ring',
'ring/func',
),
package_data={},
install_requires=install_requires,
tests_require=tests_require + ['tox', 'tox-pyenv'],
extras_require={
'tests': tests_require,
'docs': docs_require,
'dev': dev_require,
},
classifiers=[
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
) # noqa