-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
100 lines (96 loc) · 2.6 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
from setuptools import setup, find_packages
import pman.build_apps
import toml
import os
# Load the .pman configuration
CONFIG = toml.load(".pman")
# Access configuration values
APP_NAME = CONFIG["general"]["name"]
EXPORT_DIR = CONFIG["build"]["export_dir"]
ASSET_DIR = CONFIG["build"]["asset_dir"]
MAIN_FILE = CONFIG["run"]["main_file"]
# Path to your DLLs
dll_dir = os.path.join(os.getcwd(), "lib")
dll_files = [
os.path.join(dll_dir, dll)
for dll in os.listdir(dll_dir)
if dll.endswith(".dll") or dll.endswith(".pyd")
]
setup(
name=APP_NAME,
packages=find_packages(),
build_base="build/",
setup_requires=[
"pytest-runner",
"panda3d",
"panda3d-keybindings",
"panda3d-stageflow",
"panda3d-pman",
"direct",
],
tests_require=[
"pytest",
"pylint~=2.6.0",
"pytest-pylint",
],
cmdclass={
"build_apps": pman.build_apps.BuildApps,
},
options={
"build_apps": {
"include_modules": {
"*": [
"pyaudio", # Underlying PortAudio library
"numpy", # Required by sounddevice
]
},
"platforms": [
"win32",
"win_amd64",
"manylinux2014_x86_64",
"macosx_10_9_x86_64",
],
"include_patterns": [
"assets/*.*",
"**/*.png",
"**/*.ogg",
"**/*.wav",
"**/*.egg",
"**/*.bam",
"**/*.otf",
"**/*.ttf",
"**.dll",
"NPCS/**/*.png",
"lib/*",
],
"exclude_patterns": [".venv/*", "./dist/*", "./build/*"],
"rename_paths": {
EXPORT_DIR: "assets/",
},
"console_apps": {
APP_NAME: MAIN_FILE,
},
"plugins": [
"pandagl",
"p3openal_audio",
],
"icons": {
APP_NAME: [
"./icons/sanny256.png",
"./icons/sanny128.png",
"./icons/sanny64.png",
"./icons/sanny32.png",
"./icons/sanny16.png",
],
},
"use_optimized_wheels": True,
"log_filename": "./build/logs/output.log",
},
},
data_files=[
(
"lib",
dll_files,
), # This places DLL, PYD, and DYLIB files in the 'lib/' directory of the build
],
)