+-- 17 lines: import sys-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if "CV_VERSION_MAJOR" in words:
opencv_version += words[2]
opencv_version += "."
if "CV_VERSION_MINOR" in words:
opencv_version += words[2]
opencv_version += "."
if "CV_VERSION_REVISION" in words:
opencv_version += words[2]
break
+-- 12 lines: # used in local dev releases-----------------------------------------------------------------------------------------------------------------------------------------------------------------
.splitlines()[0]
.decode()
.split("-")
)
except subprocess.CalledProcessError as e:
if e.output.rstrip() == b"fatal: No names found, cannot describe anything.":
tag = []
else:
print(e.output)
raise
+-- 7 lines: if len(tag) == 1:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
version = date.today().strftime('%Y%m%d')
opencv_version += ".{}".format(version)
else:
version = git_hash
opencv_version += "+{}".format(version)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
with open("cv2/version.py", "w") as f:
f.write('opencv_version = "{}"\n'.format(opencv_version))
f.write("contrib = {}\n".format(contrib))
f.write("headless = {}\n".format(headless))
f.write("rolling = {}\n".format(rolling))
f.write("ci_build = {}".format(ci_build))
|
+-- 17 lines: import sys-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if "CV_VERSION_MAJOR" in words:
opencv_version += words[2]
opencv_version += "."
if "CV_VERSION_MINOR" in words:
opencv_version += words[3]
opencv_version += "."
if "CV_VERSION_REVISION" in words:
opencv_version += words[2]
break
+-- 12 lines: # used in local dev releases-----------------------------------------------------------------------------------------------------------------------------------------------------------------
.splitlines()[0]
.decode()
.split("-")
)
except subprocess.CalledProcessError as e:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if e.output.rstrip() == b"fatal: No names found, cannot describe anything.":
tag = []
else:
print(e.output)
raise
+-- 7 lines: if len(tag) == 1:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
version = date.today().strftime('%Y%m%d')
opencv_version += ".{}".format(version)
else:
version = git_hash
opencv_version += "+{}".format(version)
print('print')
with open("cv3/version.py", "w") as f:
f.write('opencv_version = "{}"\n'.format(opencv_version))
f.write("contrib = {}\n".format(contrib))
f.write("headless = {}\n".format(headless))
f.write("rolling = {}\n".format(rolling))
f.write("ci_build = {}".format(ci_build))
|