forked from yihuang/credis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·40 lines (36 loc) · 1.07 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
#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
try:
from Cython.Distutils import build_ext
have_cython = True
except ImportError:
have_cython = False
if have_cython:
ext_modules = [Extension("credis.base", ["credis/base.pyx"]),
Extension("credis.geventpool", ["credis/geventpool.pyx"]),
]
cmdclass = {'build_ext': build_ext}
else:
cmdclass = {}
ext_modules = [Extension("credis.base", ["credis/base.c"]),
Extension("credis.geventpool", ["credis/geventpool.c"]),
]
setup(
name='credis',
version='1.0.7',
packages=['credis'],
ext_modules=ext_modules,
cmdclass=cmdclass,
author='huangyi',
author_email='[email protected]',
url='https://github.com/yihuang/credis',
description='high performance redis client implemented with cython',
long_description=open('README.rst').read(),
install_requires=[
'hiredis >= 0.1',
],
)