-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
52 lines (41 loc) · 1.53 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
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
---------------
Myotisoft ZCANT
Copyright (C) 2012-2017 Myotisoft LLC, all rights reserved.
You may use, distribute, and modify this code under the terms of the MIT License.
"""
import site
import os.path
from setuptools import setup
from zcant import __version__
def find_dylib(dylib):
"""Find the absolute path to a named framework dylib"""
for dir in site.getsitepackages():
path = os.path.join(dir, dylib)
if os.path.isfile(path):
return path
raise RuntimeError('Unable to find dylib: %s' % dylib)
APP = 'zcant.py'
NAME = 'Myotisoft ZCANT %s' % __version__
DATA_FILES = [('', ['resources'])]
ICON = 'docs/myotisoft_icon.icns'
PY2APP_OPTIONS = {
'argv_emulation': False,
'optimize': 1,
'iconfile': ICON,
'frameworks': [find_dylib('_sounddevice_data/libportaudio.dylib')],
'excludes': ['phonon', 'qt', 'PyQt4'],
'dylib_excludes': ['PyQT', 'QtCore', 'QtDeclarative', 'QtDesigner', 'QtGui', 'QtHelp', 'QtMultimedia', 'QtNetwork', 'QtOpenGL', 'QtScript', 'QtScriptTools', 'QtSql', 'QtSvg', 'QtTest', 'QtWebKit', 'QtXml', 'QtXmlPatterns',
'phonon', 'GEOS',
'_codecs_cn.so', '_codecs_hk.so', '_codecs_iso2022.so', '_codecs_jp.so', '_codecs_kr.so', '_codecs_tw.so'],
'matplotlib_backends': '-', # only explicitly imported backends (wx)
}
setup(
app=[APP],
data_files=DATA_FILES,
options={'py2app': PY2APP_OPTIONS},
setup_requires=['py2app'],
)