-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
53 lines (46 loc) · 1.44 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
from setuptools import setup, Extension
from codecs import open
try:
from Cython.Distutils import build_ext
except ImportError:
use_cython = False
else:
use_cython = True
if use_cython:
sourcefiles = ['pycspade/cspade.pyx']
else:
sourcefiles = ['pycspade/cspade.cpp']
other_files = ['csrc/{}'.format(x) for x in [
'Itemset.cc', 'Array.cc', 'ArrayT.cc', 'Eqclass.cc', 'Lists.cc', 'extl2.cc', 'partition.cc', 'maxgap.cc',
'calcdb.cc', 'makebin.cc', 'getconf.cc', 'exttpose.cc', 'utils.cc'
]]
sourcefiles += other_files
ext_modules = [
Extension('pycspade.cspade',
sourcefiles,
include_dirs=['csrc/'],
language='c++',
extra_compile_args=[
'-std=c++11',
'-Wno-sign-compare',
'-Wno-incompatible-pointer-types',
'-Wno-unused-variable',
'-Wno-absolute-value',
'-Wno-visibility',
'-Wno-#warnings']
)
]
setup(
name='pycspade',
cmdclass={'build_ext': build_ext},
ext_modules=ext_modules,
license='MIT',
packages=['pycspade'],
version='0.3.2',
author=['Mohammed J. Zaki', 'Yukio Fukuzawa'],
description='C-SPADE Python Implementation',
long_description=open('README.md').read(),
url='https://github.com/fzyukio/pycspade',
keywords=['cspade', 'c-spade', 'sequence mining'],
install_requires=['Cython'],
)