forked from jvkersch/hsmmlearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
64 lines (55 loc) · 1.71 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
""" Hidden semi-Markov models with explicit durations in Python.
"""
import glob
import os
import setuptools # noqa
from distutils.core import setup
from distutils.extension import Extension
SOURCES = (
["hsmmlearn/base.pyx"] + glob.glob('hsmmlearn/_hsmm/src/*.cpp')
)
def get_extension_modules():
# ReadTheDocs has trouble with C extension modules, so don't build the
# Cython modules.
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if on_rtd:
return []
else:
from Cython.Build import cythonize
extensions = [
Extension("hsmmlearn.base", SOURCES, language="c++")
]
return cythonize(extensions)
CLASSIFIERS = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Programming Language :: Cython",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
]
DESCRIPTION = __doc__
LONG_DESCRIPTION = open('README.md').read()
MAINTAINER = 'Joris Vankerschaver'
MAINTAINER_EMAIL = 'Joris.Vankerschaver@gmail.com'
LICENSE = 'GPL v3'
setup(
name='hsmmlearn',
ext_modules=get_extension_modules(),
packages=['hsmmlearn'],
package_data={'hsmmlearn': ['base.pyx']},
classifiers=CLASSIFIERS,
version='0.1.0',
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
license=LICENSE,
)