Source
2581
2581
2582
2582
r = re.match(".*project\(casacore VERSION (\d+)\.(\d+)\.(\d+)\)",line)
2583
2583
if r is not None:
2584
2584
casacore_version_from_project = r.group(1, 2, 3)
2585
2585
2586
2586
if casacore_version_from_project is not None:
2587
2587
casacore_version_major = casacore_version_from_project[0]
2588
2588
casacore_version_minor = casacore_version_from_project[1]
2589
2589
casacore_version_patch = casacore_version_from_project[2]
2590
2590
2591
-
print(f"Casacore version {casacore_version_major}.{casacore_version_minor}.{casacore_version_patch}")
2591
+
print("Casacore version " + casacore_version_major + "." + casacore_version_minor + "." + casacore_version_patch)
2592
2592
2593
2593
with open("include/casacore/casa/version.h","w") as out, open("casacore/casa/version.h.in") as f:
2594
2594
for line in f:
2595
2595
l = line.replace("@PROJECT_VERSION_MAJOR@",str(casacore_version_major)) \
2596
2596
.replace("@PROJECT_VERSION_MINOR@",str(casacore_version_minor)) \
2597
2597
.replace("@PROJECT_VERSION_PATCH@",casacore_version_patch)
2598
2598
out.write(l)
2599
2599
2600
2600
2601
2601
if __name__ == '__main__':