MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_cpython_version

Function get_cpython_version

scripts/update_lib/cmd_quick.py:187–198  ·  view source on GitHub ↗

Get CPython version from git tag.

(cpython_dir: pathlib.Path)

Source from the content-addressed store, hash-verified

185
186
187def get_cpython_version(cpython_dir: pathlib.Path) -> str:
188 """Get CPython version from git tag."""
189 import subprocess
190
191 result = subprocess.run(
192 ["git", "describe", "--tags"],
193 cwd=cpython_dir,
194 capture_output=True,
195 text=True,
196 check=True,
197 )
198 return result.stdout.strip()
199
200
201def git_commit(

Callers 1

git_commitFunction · 0.85

Calls 2

runMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected