-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
38 lines (34 loc) · 1.08 KB
/
setup.py
File metadata and controls
38 lines (34 loc) · 1.08 KB
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
# setup.py
"""
Usage:
python setup.py py2app
This will create a .app in 'dist/' that you can distribute.
"""
from setuptools import setup
APP = ['app.py'] # Your main script that starts Flask
DATA_FILES = [
('templates', ['templates/index.html',
'templates/pick_brand.html',
'templates/pick_models.html',
'templates/results.html'])
]
OPTIONS = {
# "argv_emulation": True, # If you had a GUI that needs cmdline arguments
# "iconfile": "my_icon.icns", # If you have a custom .icns icon
# "packages": ["flask", "requests", ...], # Not always needed, but can help if py2app doesn't auto-detect them
"includes": [
"fuzzy_match", # Force py2app to include your modules if auto-discovery misses them
"otoparts_dict",
"autopia_dict"
],
"resources": [
# Another way to ensure your entire 'templates' folder is included
# or other data you might need
],
}
setup(
app=APP,
data_files=DATA_FILES,
options={"py2app": OPTIONS},
setup_requires=["py2app"],
)