-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
115 lines (96 loc) · 3.86 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
"""
This file contains the setuptools commands and code used for Programmer's Quest
distribution and development utilizing custom and Panda3d specific tools
"""
#----------------------------------------------------------------------------------------------------------------------------------#
####################################################################################################################################
#----------------------------------------------------------------------------------------------------------------------------------#
import os
import sys
from setuptools import setup
from tools import command, commands
from tools import utils
#----------------------------------------------------------------------------------------------------------------------------------#
################################################ Setup tools configuration variables ###############################################
#----------------------------------------------------------------------------------------------------------------------------------#
APP_NAME = "Programmer's Quest"
PACKAGES = ['quest']
SOURCE_ROOT = '.'
# Modules to exclude from builds
EXCLUDE_MODULES = [
'limeade'
]
# Panda3D plugins to include in builds
PLUGINS = [
'pandagl',
'p3openal_audio',
]
# Executable icons used by the client application
CLIENT_ICONS = [
]
#
RENAME_PATHS = {
}
#
INCLUDE_PATTERNS = [
]
#----------------------------------------------------------------------------------------------------------------------------------#
################################################# Setup tools script main function #################################################
#----------------------------------------------------------------------------------------------------------------------------------#
def main() -> int:
"""
Main entry point for the setuptools script
"""
# Setup our source root if it is not
# the same directory as this script file
if SOURCE_ROOT != '.':
sys.path.append(SOURCE_ROOT)
os.chdir(SOURCE_ROOT)
# Register our commands and call the `setup` function from
# the setuptools module
commands.register_commands()
setup(
name=APP_NAME,
packages=PACKAGES,
version=utils.get_application_version(),
setup_requires=[
'pytest-runner',
],
tests_require=[
'pytest',
'pylint~=2.6.0',
'pytest-pylint',
],
cmdclass=command.command_book.get_commands(),
options={
'build_apps': {
'include_patterns': INCLUDE_PATTERNS,
'rename_paths': RENAME_PATHS,
'gui_apps': {
APP_NAME: 'quest/client/client.py',
},
'macos_main_app': APP_NAME,
'requirements_path': utils.get_doc_file_path('requirements.txt'),
'log_filename': '$USER_APPDATA/%s/logs/%s.log' % (APP_NAME, APP_NAME),
'exclude_modules': {
'*': EXCLUDE_MODULES
},
'plugins': PLUGINS,
'icons': {
APP_NAME: CLIENT_ICONS,
},
},
'bdist_apps': {
'installers': {
'manylinux1_x86_64': 'zip',
}
},
})
# Return a success exit code
return 0
# Main entry point for the setuptools script
if __name__ == '__main__':
sys.exit(main())
#----------------------------------------------------------------------------------------------------------------------------------#
####################################################################################################################################
#----------------------------------------------------------------------------------------------------------------------------------#