forked from dedupeio/pyhacrf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
61 lines (56 loc) · 2.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
56
57
58
59
60
61
from setuptools import setup, Extension
import numpy
import numpy.distutils
try:
from Cython.Build import cythonize
use_cython = True
except ImportError:
use_cython = False
if use_cython:
ext_modules = cythonize([Extension('pyhacrf.algorithms',
['pyhacrf/algorithms.pyx'],
extra_compile_args = ["-ffast-math", "-O4"],
**numpy.distutils.misc_util.get_info('npymath')),
Extension('pyhacrf.adjacent',
['pyhacrf/adjacent.pyx'],
include_dirs=[numpy.get_include()],
extra_link_args=['-lm'],
extra_compile_args = ["-ffast-math", "-O4"])])
else:
ext_modules = [Extension('pyhacrf.algorithms',
['pyhacrf/algorithms.c'],
extra_compile_args = ["-ffast-math", "-O4"],
**numpy.distutils.misc_util.get_info('npymath')),
Extension('pyhacrf.adjacent',
['pyhacrf/adjacent.c'],
extra_link_args=['-lm'],
include_dirs=[numpy.get_include()],
extra_compile_args = ["-ffast-math", "-O4"])]
def readme():
with open('README.rst') as f:
return f.read()
setup(
name='pyhacrf-datamade',
version='0.2.5',
packages=['pyhacrf'],
install_requires=["numpy>=1.14.1; python_version<'3.6'",
"numpy>=1.15.0; python_version=='3.7'",
"numpy>=1.17.3; python_version=='3.8'",
"numpy; python_version>'3.8'",
'PyLBFGS>=0.1.3'],
ext_modules=ext_modules,
url='https://github.com/datamade/pyhacrf',
author='Dirko Coetsee',
author_email='dpcoetsee@gmail.com',
maintainer='Forest Gregg',
maintainer_email='fgregg@gmail.com',
description='Hidden alignment conditional random field, a discriminative string edit distance',
long_description=readme(),
classifiers=[
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Scientific/Engineering',
],
)