forked from Yuukiy/JavSP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
47 lines (36 loc) · 955 Bytes
/
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
import os
from typing import List, Tuple
from cx_Freeze import setup, Executable
# https://github.com/marcelotduarte/cx_Freeze/issues/1288
base = None
proj_root = os.path.abspath(os.path.dirname(__file__))
include_files: List[Tuple[str, str]] = [
(f'{proj_root}/config.yml', 'config.yml'),
(f'{proj_root}/data', 'data'),
(f'{proj_root}/image', 'image')
]
includes = []
for file in os.listdir('javsp/web'):
name, ext = os.path.splitext(file)
if ext == '.py':
includes.append('javsp.web.' + name)
packages = [
'pendulum' # pydantic_extra_types depends on pendulum
]
build_exe = {
'include_files': include_files,
'includes': includes,
'excludes': ['unittest'],
'packages': packages,
}
javsp = Executable(
'./javsp/__main__.py',
target_name='JavSP',
base=base,
icon='./image/JavSP.ico',
)
setup(
name='JavSP',
options = {'build_exe': build_exe},
executables=[javsp]
)