File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 8
8
import os
9
9
import stat
10
10
import sys
11
+ import subprocess
11
12
12
13
13
14
def parse_requirements (filename ):
@@ -100,9 +101,19 @@ def download_mavsdk_server(self):
100
101
os .chmod (self .mavsdk_server_filepath , st .st_mode | stat .S_IEXEC )
101
102
102
103
104
+ def version ():
105
+ process = subprocess .Popen (["git" , "describe" , "--tags" ],
106
+ stdout = subprocess .PIPE )
107
+ (output , err ) = process .communicate ()
108
+ exit_code = process .wait ()
109
+ if exit_code != 0 :
110
+ raise RuntimeError (f"git describe command exited with: { exit_code } " )
111
+ return output .decode ("utf-8" ).strip ()
112
+
113
+
103
114
setup (
104
115
name = "mavsdk" ,
105
- version = "0.5.0" ,
116
+ version = version () ,
106
117
description = "Python wrapper for MAVSDK" ,
107
118
long_description = parse_long_description (),
108
119
url = "https://github.com/mavlink/MAVSDK-Python" ,
You can’t perform that action at this time.
0 commit comments