We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ecc0d70 + 8d05107 commit 934443aCopy full SHA for 934443a
setuptools_rust/rustc_info.py
@@ -10,7 +10,7 @@ def get_rust_version() -> Optional[Version]: # type: ignore[no-any-unimported]
10
try:
11
# first line of rustc -Vv is something like
12
# rustc 1.61.0 (fe5b13d68 2022-05-18)
13
- return Version(_rust_version_verbose().split(" ")[1])
+ return Version(_rust_version().split(" ")[1])
14
except (subprocess.CalledProcessError, OSError):
15
return None
16
@@ -58,6 +58,11 @@ def get_rust_target_list() -> List[str]:
58
return output.splitlines()
59
60
61
+@lru_cache()
62
+def _rust_version() -> str:
63
+ return subprocess.check_output(["rustc", "-V"], text=True)
64
+
65
66
@lru_cache()
67
def _rust_version_verbose() -> str:
68
return subprocess.check_output(["rustc", "-Vv"], text=True)
0 commit comments