-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathbuild-macos.py
More file actions
36 lines (28 loc) · 757 Bytes
/
build-macos.py
File metadata and controls
36 lines (28 loc) · 757 Bytes
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
import os
import py2app
import shutil
from distutils.core import setup
def tree(src):
return [(root, map(lambda f: os.path.join(root, f), files))
for (root, dirs, files) in os.walk(os.path.normpath(src))]
if os.path.exists('build'):
shutil.rmtree('build')
if os.path.exists('dist/index.app'):
shutil.rmtree('dist/index.app')
ENTRY_POINT = ['src/index.py']
DATA_FILES = tree('gui')
OPTIONS = {
'argv_emulation': False,
'strip': False,
'iconfile': 'src/assets/logo.icns',
'packages': ['WebKit', 'Foundation', 'webview'],
'plist': {
'NSRequiresAquaSystemAppearance': False
},
'resources': DATA_FILES
}
setup(
app=ENTRY_POINT,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)