forked from seomoz/pyreBloom
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
35 lines (30 loc) · 1.04 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
from distutils.core import setup
ext_files = ["pyreBloom/bloom.c", "hiredis/async.c", "hiredis/hiredis.c", "hiredis/net.c", "hiredis/sds.c"]
kwargs = {}
try:
from Cython.Distutils import build_ext
from Cython.Distutils import Extension
print "Building from Cython"
ext_files.append("pyreBloom/pyreBloom.pyx")
kwargs['cmdclass'] = {'build_ext': build_ext}
except ImportError:
from distutils.core import Extension
ext_files.append("pyreBloom/pyreBloom.c")
print "Building from C"
ext_modules = [Extension("pyreBloom", ext_files, include_dirs=['hiredis', "."])]
setup(
name = 'pyreBloom',
version = "0.1.2",
author = "Dan Lecocq",
author_email = "[email protected]",
license = "MIT License",
ext_modules = ext_modules,
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: C',
'Programming Language :: Cython',
'Topic :: Software Development :: Libraries :: Python Modules',
],
**kwargs
)