Skip to content

Commit d6d53e6

Browse files
committed
setup: fix version for setuptools=66
We need to append the git hash with a +. Signed-off-by: Julian Oes <[email protected]>
1 parent a0b4450 commit d6d53e6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,14 @@ def download_mavsdk_server(self):
120120
def version():
121121
process = subprocess.Popen(["git", "describe", "--tags"],
122122
stdout=subprocess.PIPE)
123-
(output, err) = process.communicate()
123+
output, _ = process.communicate()
124124
exit_code = process.wait()
125125
if exit_code != 0:
126126
raise RuntimeError(f"git describe command exited with: {exit_code}")
127-
return output.decode("utf-8").strip()
127+
git_describe_str = output.decode("utf-8").strip()
128+
git_describe_str = git_describe_str.replace("-g", "+g")
129+
print(git_describe_str)
130+
return git_describe_str
128131

129132

130133
setup(

0 commit comments

Comments
 (0)