forked from axiak/pybloomfiltermmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
43 lines (37 loc) · 1.2 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
from distutils.core import setup
from distutils.extension import Extension
ext_files = ["src/mmapbitarray.c",
"src/bloomfilter.c",
"src/md5.c",
"src/primetester.c",
]
kwargs = {}
try:
from Cython.Distutils import build_ext
print "Building from Cython"
ext_files.append("src/pybloomfilter.pyx")
kwargs['cmdclass'] = {'build_ext': build_ext}
except ImportError:
ext_files.append("src/pybloomfilter.c")
print "Building from C"
ext_modules = [Extension("pybloomfilter",
ext_files)]
setup(
name = 'pybloomfiltermmap',
version = "0.3.2",
author = "Michael Axiak, Rob Stacey",
author_email = "[email protected]",
url = "http://github.com/axiak/pybloomfiltermmap/",
description = "A Bloom filter (bloomfilter) for Python built on mmap",
license = "MIT License",
ext_modules = ext_modules,
classifiers = [
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: C',
'Programming Language :: Cython',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
**kwargs
)