forked from youknowone/ring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
113 lines (99 loc) · 2.71 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
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.4.3',
'attrs>=19.3.0',
'inspect2>=0.1.0;python_version<"3.0.0"',
'functools32>=3.2.3-2>=0.1.0;python_version<"3.0"',
]
tests_require = [
'pytest>=3.10.1', 'pytest-cov', 'pytest-lazy-fixture==0.6.2',
'mock', 'patch',
'pymemcache',
'redis', 'requests',
'diskcache>=4.1.0',
'django',
'numpy',
]
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):
assert tests_require[0].startswith('pytest')
tests_require[0] = 'pytest==3.10.1'
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',
])
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',
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.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
) # noqa