From ac1be9e2a40bef1cf8b4b3c84683b7cdcafa733b Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Tue, 23 Aug 2022 16:14:34 +0900 Subject: [PATCH] Fix whats_left --- Lib/platform.py | 8 +++++++- vm/src/version.rs | 5 ++--- 2 files changed, 9 insertions(+), 4 deletions(-) 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()