forked from Ryochan7/sc-controller
-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
executable file
·47 lines (43 loc) · 2.12 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
#!/usr/bin/env python3
"""Installation script for everything that could not be migrated to pyproject.toml so far."""
import glob
from setuptools import Extension, setup
data_files = [
("share/scc/glade", glob.glob("glade/*.glade")),
("share/scc/glade/ae", glob.glob("glade/ae/*.glade")),
("share/scc/images", glob.glob("images/*.svg")),
("share/scc/images", glob.glob("images/*.json")),
("share/scc/images/button-images", glob.glob("images/button-images/*.svg")),
("share/scc/images/button-images", glob.glob("images/button-images/*.json")),
("share/scc/images/controller-icons", glob.glob("images/controller-icons/*.svg")),
("share/scc/images/controller-images", glob.glob("images/controller-images/*.svg")),
("share/icons/hicolor/24x24/status", glob.glob("images/24x24/status/*.png")),
("share/icons/hicolor/256x256/status", glob.glob("images/256x256/status/*.png")),
("share/scc/default_profiles", glob.glob("default_profiles/*.sccprofile")),
("share/scc/default_profiles", glob.glob("default_profiles/.*.sccprofile")),
("share/scc/default_menus", glob.glob("default_menus/*.menu")),
("share/scc/default_menus", glob.glob("default_menus/.*.menu")),
("share/scc/osd-styles", glob.glob("osd-styles/*.json")),
("share/scc/osd-styles", glob.glob("osd-styles/*.css")),
("share/scc/", ["gamecontrollerdb.txt"]),
("share/pixmaps", [ "images/sc-controller.svg" ]),
("share/mime/packages", [ "scc-mime-types.xml" ]),
("share/applications", ["scripts/sc-controller.desktop" ]),
("lib/udev/rules.d", glob.glob("scripts/*.rules")),
] + [ # menu icons subfolders
(
"share/scc/images/menu-icons/" + x.split("/")[-1],
[ x + "/LICENSES" ] + glob.glob(x + "/*.png")
) for x in glob.glob("images/menu-icons/*")
]
extensions = [
Extension("libuinput", sources=["scc/uinput.c"]),
Extension("libcemuhook", sources=["scc/cemuhook_server.c"], libraries=["z"], define_macros=[("PYTHON", "1")]),
Extension("libhiddrv", sources=["scc/drivers/hiddrv.c"]),
Extension("libsc_by_bt", sources=["scc/drivers/sc_by_bt.c"]),
Extension("libremotepad", sources=["scc/drivers/remotepad_controller.c"]),
]
setup(
ext_modules=extensions,
data_files = data_files,
)