From 8cc3c0ed60ef09e2742877735f1393b10e2c447f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Wed, 20 Sep 2023 10:34:04 +0100 Subject: [PATCH] Write salt version before building when using --with-salt-version --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index c2f7e20526fc..e9b94c636baa 100755 --- a/setup.py +++ b/setup.py @@ -595,6 +595,10 @@ def finalize_options(self): class Build(build): def run(self): + if getattr(self.distribution, "with_salt_version", False): + self.distribution.salt_version_hardcoded_path = SALT_VERSION_HARDCODED + self.run_command("write_salt_version") + # Run build.run function build.run(self) salt_build_ver_file = os.path.join(self.build_lib, "salt", "_version.txt")