forked from mattilyra/LSH
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·44 lines (35 loc) · 1.14 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
#! /usr/bin/env python
from __future__ import print_function
from setuptools import setup, Extension
USE_CYTHON = True
DISTNAME = 'lsh'
DESCRIPTION = 'A library for performing shingling and LSH for python.'
MAINTAINER = 'Matti Lyra'
MAINTAINER_EMAIL = '[email protected]'
URL = 'https://github.com/mattilyra/lsh'
DOWNLOAD_URL = 'https://github.com/mattilyra/lsh'
VERSION = '0.3.0'
ext = '.pyx' if USE_CYTHON else '.cpp'
try:
import numpy as np
includes = [np.get_include()]
except ImportError:
includes = []
extensions = [Extension("lsh.cMinhash",
["lsh/cMinhash{}".format(ext), 'lsh/MurmurHash3.cpp'],
include_dirs=includes)]
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions, force=True)
install_deps = ['numpy', 'cython>=0.24.1']
test_deps = ['coverage>=4.0.3', 'pytest>=3.0', ]
setup(name=DISTNAME,
version=VERSION,
description=DESCRIPTION,
author=MAINTAINER,
author_email=MAINTAINER_EMAIL,
url=URL,
packages=['lsh'],
ext_modules=extensions,
install_requires=install_deps,
tests_require=test_deps)