From f5cdfb265b5c669ca3b9465e5c89be7e4fbb8c9a Mon Sep 17 00:00:00 2001 From: Benjamin Bolte Date: Fri, 22 Nov 2024 23:41:15 -0800 Subject: [PATCH] better build --- setup.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 537a72f..b1b407e 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,7 @@ from setuptools import find_packages, setup from setuptools.command.build_ext import build_ext +from setuptools.command.build_py import build_py from setuptools_rust import Binding, RustExtension with open("README.md", "r", encoding="utf-8") as f: @@ -47,6 +48,12 @@ def run(self) -> None: super().run() +class CustomBuild(build_py): + def run(self) -> None: + self.run_command("build_ext") + super().run() + + setup( name="actuator", version=version, @@ -69,5 +76,8 @@ def run(self) -> None: extras_require={"dev": requirements_dev}, include_package_data=True, packages=find_packages(include=["actuator"]), - cmdclass={"build_ext": RustBuildExt}, + cmdclass={ + "build_ext": RustBuildExt, + "build_py": CustomBuild, + }, )