forked from randovania/randovania
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
40 lines (28 loc) · 805 Bytes
/
setup.py
File metadata and controls
40 lines (28 loc) · 805 Bytes
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
from __future__ import annotations
import shutil
from pathlib import Path
from pyqt_distutils.build_ui import build_ui
from setuptools import Command, setup
from setuptools.command.build import build
class CopyReadmeCommand(Command):
"""Custom build command."""
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
parent = Path(__file__).parent
shutil.copy2(parent.joinpath("README.md"), parent.joinpath("randovania", "data", "README.md"))
class CustomBuild(build):
sub_commands = [
("copy_readme", None),
("build_ui", None),
*build.sub_commands,
]
setup(
cmdclass={
"copy_readme": CopyReadmeCommand,
"build_ui": build_ui,
"build": CustomBuild,
},
)