forked from dirko/pyhacrf
-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
67 lines (59 loc) · 1.86 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
62
63
64
65
66
67
from os.path import abspath, join
from Cython.Build import cythonize
import numpy
from setuptools import Extension, setup
defs = [("NPY_NO_DEPRECATED_API", 0)]
inc_path = numpy.get_include()
# Add path for npymath libraries:
lib_path = [abspath(join(numpy.get_include(), "..", "lib"))]
ext_modules = cythonize(
[
Extension(
"pyhacrf.algorithms",
["pyhacrf/algorithms.pyx"],
extra_compile_args=["-ffast-math", "-O4"],
include_dirs=[inc_path],
library_dirs=lib_path,
libraries=["npymath"],
extra_link_args=["-lm"],
define_macros=defs,
),
Extension(
"pyhacrf.adjacent",
["pyhacrf/adjacent.pyx"],
include_dirs=[numpy.get_include()],
extra_link_args=["-lm"],
extra_compile_args=["-ffast-math", "-O4"],
),
]
)
def readme():
with open("README.rst") as f:
return f.read()
setup(
name="pyhacrf-datamade",
version="0.2.8",
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="[email protected]",
maintainer="Forest Gregg",
maintainer_email="[email protected]",
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",
],
)