-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
py2app_setup.py
46 lines (39 loc) · 937 Bytes
/
py2app_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
"""
This is a setup.py script generated by py2applet
Usage:
python py2app_setup.py py2app
"""
import py2app
import os
from setuptools import setup
def check_mode() -> str:
match os.environ:
case {"CI_MODE": b}:
if b:
return "Ci"
case {"TEST_MODE": b}:
if b:
return "Test"
return ""
MODE = check_mode()
APP = [f"mac/{MODE}Pomodouroboros.py"]
DATA_FILES = [
"IBFiles/GoalListWindow.xib",
"IBFiles/IntentionEditor.xib",
"IBFiles/MainMenu.xib",
"IBFiles/ProgressHUD.xib",
]
OPTIONS = {
"plist": {
"LSUIElement": True,
"NSRequiresAquaSystemAppearance": False,
"CFBundleIdentifier": f"im.glyph.and.this.is.{MODE}pomodouroboros",
"CFBundleName": f"{MODE}Pomodouroboros",
},
"iconfile": f"{MODE}icon.icns",
"app": APP,
}
setup(
data_files=DATA_FILES,
options={"py2app": OPTIONS},
)