From 7fff510f41ebc914eb988325e3a17120a369c30c Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Thu, 15 Jun 2023 18:00:53 +0200 Subject: [PATCH] setup.py: run coding style checks as part of the build Signed-off-by: Andrea Righi --- setup.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setup.py b/setup.py index c8e377e..85fc903 100755 --- a/setup.py +++ b/setup.py @@ -1,8 +1,17 @@ #!/usr/bin/env python3 import os +import subprocess from setuptools import setup from kconfig.version import VERSION +from setuptools.command.build_py import build_py + + +class BuildPy(build_py): + def run(self): + subprocess.check_call(["make"]) + build_py.run(self) + setup( name="annotations", @@ -23,6 +32,9 @@ setup( "annotations = kconfig.run:main", ] }, + cmdclass={ + "build_py": BuildPy, + }, scripts=[ "bin/sanitize-annotations", ], -- 2.31.1