-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
106 lines (95 loc) · 2.88 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
__author__ = 'Maximilian Bisani'
__version__ = '$LastChangedRevision: 1691 $'
__date__ = '$LastChangedDate: 2011-08-03 15:38:08 +0200 (Wed, 03 Aug 2011) $'
__copyright__ = 'Copyright (c) 2004-2005 RWTH Aachen University'
__license__ = """
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 2 (June
1991) as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, you will find it at
http://www.gnu.org/licenses/gpl.html, or write to the Free Software
Foundation, Inc., 51 Franlin Street, Fifth Floor, Boston, MA 02110,
USA.
Should a provision of no. 9 and 10 of the GNU General Public License
be invalid or become invalid, a valid provision is deemed to have been
agreed upon which comes closest to what the parties intended
commercially. In any case guarantee/warranty shall be limited to gross
negligent actions or intended actions or fraudulent concealment.
"""
from distutils.core import setup, Extension
import numpy
import os
sequiturExtension = Extension(
'_sequitur_',
language = 'c++',
define_macros=[
('MULTIGRAM_SIZE', '2')],
sources = [
'sequitur.i',
'Assertions.cc',
'Types.cc',
'Utility.cc',
'Graph.cc',
'Multigram.cc'],
depends = [
'Assertions.hh',
'Graph.hh',
'Multigram.hh',
'MultigramGraph.hh',
'Multigram.hh',
'Obstack.hh',
'PriorityQueue.hh',
'Probability.hh',
'Python.hh',
'ReferenceCounting.hh',
'SequenceModel.hh',
'Types.hh',
'Utility.hh',
'EditDistance.cc',
'Estimation.cc',
'SequenceModel.cc',
'Translation.cc'],
include_dirs = [
os.path.join(path, 'core/include') for path in numpy.__path__ ],
extra_compile_args = [
'-fpermissive']
)
sequiturModules = [
'Evaluation',
'Minimization',
'SequenceModel',
'SequiturTool',
'g2p',
'misc',
'sequitur',
'sequitur_',
'symbols',
'tool']
sequiturScripts = [
'g2p.py']
#os.system('pyrexc SparseVector.pyx')
#sparseExtension = Extension('SparseVector', ['SparseVector.c'])
#os.system('pyrexc IntTuple.pyx')
#intTupleExtension = Extension('IntTuple', ['IntTuple.c'])
lmModules = [
'IterMap',
'mGramCounts',
'groupedCounts',
'SimpleGoodTuring',
'LanguageModel',
'makeOvModel']
lmScripts = [
'makeOvModel.py']
setup(
name = 'sequitur',
version = 'perpetually-alpha',
description = 'sequence and joint-sequence modelling tool',
author = 'Maximilian Bisani',
py_modules = sequiturModules,
ext_modules = [sequiturExtension],
scripts = sequiturScripts)