diff --git a/Lib/platform.py b/Lib/platform.py index e32f9c11c..fe88fa9d5 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -1065,7 +1065,13 @@ def _sys_version(sys_version=None): repr(sys_version)) version, buildno, builddate, buildtime, compiler = \ match.groups() - name = 'CPython' + + # XXX: RUSTPYTHON support + if "rustc" in sys_version: + name = "RustPython" + else: + name = 'CPython' + if builddate is None: builddate = '' elif buildtime: diff --git a/vm/src/version.rs b/vm/src/version.rs index b98f8c28c..452f659ef 100644 --- a/vm/src/version.rs +++ b/vm/src/version.rs @@ -1,8 +1,7 @@ /* Several function to retrieve version information. */ -use chrono::prelude::DateTime; -use chrono::Local; +use chrono::{prelude::DateTime, Local}; use std::time::{Duration, UNIX_EPOCH}; // = 3.10.0alpha @@ -18,7 +17,7 @@ pub const VERSION_HEX: usize = pub fn get_version() -> String { format!( - "{:.80} ({:.80}) \n[{:.80}]", + "{:.80} ({:.80}) \n[{:.80}]", // \n is PyPy convention get_version_number(), get_build_info(), get_compiler()