Skip to content

Commit

Permalink
better build
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Nov 23, 2024
1 parent a24ae71 commit f5cdfb2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand All @@ -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,
},
)

0 comments on commit f5cdfb2

Please sign in to comment.