Skip to content

Commit

Permalink
setup: fix version for setuptools=66
Browse files Browse the repository at this point in the history
We need to append the git hash with a +.

Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Feb 13, 2024
1 parent a0b4450 commit d6d53e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,14 @@ def download_mavsdk_server(self):
def version():
process = subprocess.Popen(["git", "describe", "--tags"],
stdout=subprocess.PIPE)
(output, err) = process.communicate()
output, _ = process.communicate()
exit_code = process.wait()
if exit_code != 0:
raise RuntimeError(f"git describe command exited with: {exit_code}")
return output.decode("utf-8").strip()
git_describe_str = output.decode("utf-8").strip()
git_describe_str = git_describe_str.replace("-g", "+g")
print(git_describe_str)
return git_describe_str


setup(
Expand Down

0 comments on commit d6d53e6

Please sign in to comment.