-
Notifications
You must be signed in to change notification settings - Fork 16
/
esk_setup.py
147 lines (135 loc) · 5.46 KB
/
esk_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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
from esky import bdist_esky
from distutils.core import setup
import scipy.special
import PyQt5
import os
import sys
from glob import glob
from corpustools import acousticsim
from corpustools.corpus.io import textgrid
ufuncs_path = scipy.special._ufuncs.__file__
doc_files = dict()
for root, dirnames, filenames in os.walk('docs/build'):
if os.path.basename(root).startswith('.'):
continue
if os.path.basename(root) in ['_images', '_sources']:
continue
hr = root.replace('docs/build', 'html')
if hr not in doc_files:
doc_files[hr] = []
for f in filenames:
if not f.startswith('.'):
doc_files[hr].append(os.path.join(root,f))
incl_files = list(doc_files.items())
base = None
freezer_module = 'cxfreeze'
freezer_options = {
"includes":[
"sip",
"PyQt5",
"PyQt5.QtWebKitWidgets",
"PyQt5.QtWebKit",
"PyQt5.QtPrintSupport",
"PyQt5.QtMultimedia",
"esky",
"numpy",
"scipy",
"numpy.lib.format",
"numpy.linalg",
"numpy.linalg._umath_linalg",
"numpy.linalg.lapack_lite",
"scipy.io.matlab.streams",
"scipy.integrate",
"scipy.integrate.vode",
#"scipy.sparse.linalg.dsolve.umfpack",
"scipy.integrate.lsoda",
"scipy.special",
"scipy.special._ufuncs_cxx",
"scipy.sparse.csgraph._validation",
"acousticsim",
"textgrid",
"sys",
"multiprocessing"],
"excludes":[
'matplotlib',
"tcl",
'ttk',
"tkinter"]
}
if sys.platform == "win32":
base = "Win32GUI"
libegl = os.path.join(os.path.dirname(PyQt5.__file__),'libEGL.dll')
#incl_files.append((libegl,os.path.split(libegl)[1]))
group_name = 'PCT'
exe_name = 'Phonological CorpusTools'
exe = bdist_esky.Executable('corpustools/command_line/pct.py',
#targetName = 'pct',
gui_only=True,
#shortcutDir=r'[StartMenuFolder]\%s' % group_name,
shortcutName=exe_name,
#icon='docs/images/favicon.png'
)
build_exe_options = {"excludes": [
'matplotlib',
"tcl",
'ttk',
"tkinter",],
"includes": [
"PyQt5",
"PyQt5.QtWebKitWidgets",
"PyQt5.QtWebKit",
"PyQt5.QtPrintSupport",
"numpy",
"scipy",
"numpy.lib.format",
"numpy.linalg",
"numpy.linalg._umath_linalg",
"numpy.linalg.lapack_lite",
"scipy.io.matlab.streams",
"scipy.integrate",
"scipy.integrate.vode",
#"scipy.sparse.linalg.dsolve.umfpack",
"scipy.integrate.lsoda",
"scipy.special",
"scipy.special._ufuncs_cxx",
"scipy.sparse.csgraph._validation",
"acousticsim",
"textgrid",
"sys",
"multiprocessing"]
}
bdist_mac_options = {'iconfile':'docs/images/favicon.icns',
'qt_menu_nib':'/opt/local/share/qt5/plugins/platforms',
'bundle_name':'Phonological CorpusTools',
#'include_frameworks':["/Library/Frameworks/Tcl.framework",
# "/Library/Frameworks/Tk.framework"]
}
bdist_dmg_options = {'applications_shortcut':True}
setup(name="PhonologicalCorpusTools",
version="1.5.1",
scripts=[exe],
packages=['corpustools',
'corpustools.corpus',
'corpustools.corpus.classes',
'corpustools.corpus.io',
'corpustools.freqalt',
'corpustools.funcload',
'corpustools.kl',
'corpustools.prod',
'corpustools.phonosearch',
'corpustools.gui',
'corpustools.symbolsim',
'corpustools.neighdens',
'corpustools.mutualinfo',
'corpustools.phonoprob',
'corpustoools.acousticsim'],
data_files = incl_files,
options={
#"bdist_mac_options":bdist_mac_options,
"bdist_esky":{
#"pre_zip_callback":fix_freeze,
"freezer_module":freezer_module,
"freezer_options":freezer_options
},
}
)