Lines Matching defs:version
6 Handle Python version check logic.
9 like during documentation build, a newer version of python could be
16 Python version if present.
35 def __init__(self, version):
37 Ïnitialize self.version tuple from a version string.
39 self.version = self.parse_version(version)
42 def parse_version(version):
44 Convert a major.minor.patch version into a tuple.
46 return tuple(int(x) for x in version.split("."))
49 def ver_str(version):
51 Returns a version tuple as major.minor.patch.
53 return ".".join([str(x) for x in version])
80 Return a version tuple as major.minor.patch from self.version.
82 return self.ver_str(self.version)
87 Get python version from a Python binary. As we need to detect if
97 result = subprocess.run([cmd, "--version"],
102 version = result.stdout.strip()
104 match = re.search(r"(\d+\.\d+\.\d+)", version)
108 print(f"Can't parse version {version}")
114 Detect if are out there any python 3.xy version newer than the
132 version = PythonVersion.get_python_version(cmd)
133 if version >= min_version:
134 python_cmd.append((version, cmd))
143 for Sphinx build. If not, re-run with a newer version if found.
154 print(f"ERROR: Python version {python_ver} is not supported anymore\n")
155 print(" Can't find a new version. This script may fail")
184 # Restart script using the newer version