-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsetup.py
More file actions
22 lines (14 loc) · 670 Bytes
/
Copy pathsetup.py
File metadata and controls
22 lines (14 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Setuptools build customizations for bundled retargeting configs."""
from __future__ import annotations
import shutil
from pathlib import Path
from setuptools import setup
from setuptools.command.build_py import build_py as _build_py
class BuildPyWithConfigs(_build_py):
"""Copy the repository config source of truth into built wheels."""
def run(self) -> None:
super().run()
source = Path(__file__).resolve().parent / "configs" / "retargeting"
target = Path(self.build_lib) / "somehand" / "_resources" / "retargeting"
shutil.copytree(source, target, dirs_exist_ok=True)
setup(cmdclass={"build_py": BuildPyWithConfigs})