-
Notifications
You must be signed in to change notification settings - Fork 67
/
setup.py
37 lines (32 loc) · 1.08 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
from distutils.core import setup
ext_files = ['pyreBloom/bloom.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, libraries=['hiredis'],
library_dirs=['/usr/local/lib'],
include_dirs=['/usr/local/include'])]
setup(
name = 'pyreBloom',
version = '1.0.2',
author = 'Dan Lecocq',
author_email = 'dan@seomoz.org',
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
)