-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
55 lines (48 loc) · 1.4 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
#! /usr/bin/env python
from setuptools import setup, Extension
import sys
try:
import Cython
pass
except ImportError:
print("*** cannot import Cython")
pass
if "Cython" in globals():
print("*** info: Building from Cython")
ext_files = ["bloomfilter/_bloomfilter.pyx"]
else:
print("*** info: Building from C")
ext_files = ["bloomfilter/_bloomfilter.c"]
ext_modules = [
Extension(
"bloomfilter._bloomfilter", ext_files, include_dirs=["bloomfilter"]
)
]
requirements = []
if sys.version_info[0] < 3 and sys.version_info[1] < 7:
requirements.append("importlib")
setup(
name="bloomfilter",
version="0.2.1",
description="Bloom Filter (Python)",
license="MIT License",
url="http://github.com/seomoz/bloomfilter-py",
author="Moz, Inc.",
author_email="[email protected]",
packages=["bloomfilter"],
package_dir={"bloomfilter": "bloomfilter"},
install_requires=[requirements],
tests_require=["coverage", "nose", "pylint"],
scripts=[],
ext_modules=ext_modules,
test_suite="test",
classifiers=[
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: C",
"Programming Language :: Cython",
"Programming Language :: Python",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)