forked from dedupeio/dedupe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
39 lines (28 loc) · 1.23 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
#!/usr/bin/python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, Extension
except ImportError :
raise ImportError("setuptools module required, please go to https://pypi.python.org/pypi/setuptools and follow the instructions for installing setuptools")
# from Michael Hoffman's http://www.ebi.ac.uk/~hoffman/software/sunflower/
class NumpyExtension(Extension):
def __init__(self, *args, **kwargs):
Extension.__init__(self, *args, **kwargs)
self._include_dirs = self.include_dirs
del self.include_dirs # restore overwritten property
# warning: Extension is a classic class so it's not really read-only
@property
def include_dirs(self):
from numpy import get_include
return self._include_dirs + [get_include()]
setup(
name='Dedupe',
url='https://github.com/open-city/dedupe',
version='0.3',
packages=['dedupe'],
ext_modules=[NumpyExtension('dedupe.affinegap', ['src/affinegap.c']),
NumpyExtension('dedupe.lr', sources=['src/lr.c'])],
license='The MIT License: http://www.opensource.org/licenses/mit-license.php',
install_requires=['numpy', 'fastcluster', 'hcluster', 'networkx'],
long_description=open('README.md').read(),
)