/
setup.py
52 lines (42 loc) · 1.14 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
from distutils.core import setup
import glob
# The main entry point of the program
script_file = 'main.py'
# Create a list of data files.
image_files = glob.glob('images/*.*')
# Create a list of data files.
shader_files = glob.glob('shaders/*.shader')
mydata_files = [('images', image_files),('shaders', shader_files)]
# Setup args that apply to all setups, including ordinary distutils.
setup_args = dict(
data_files=mydata_files)
# py2exe options
try:
import py2exe
setup_args.update(dict(
windows=[dict(
script=script_file
)],
options={"py2exe": {
'bundle_files' : 3,
'ascii' : 0,
}
},
#zipfile = None
)
)
except ImportError:
pass
# py2app options
# try:
# import py2app
# setup_args.update(dict(
# app=[script_file],
# options=dict(py2app=dict(
# argv_emulation=True,
# iconfile='assets/app.icns',
# )),
# ))
# except ImportError:
# pass
setup(**setup_args)