From 3bd154e70aa158c3c090dd2104f1699f408f89c7 Mon Sep 17 00:00:00 2001 From: messense Date: Sun, 4 Jun 2023 11:15:59 +0800 Subject: [PATCH] Fix cargo build and format python code --- src/python_interpreter/config.rs | 2 +- src/python_interpreter/get_interpreter_metadata.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/python_interpreter/config.rs b/src/python_interpreter/config.rs index 8a00ffedc..6ff3600f1 100644 --- a/src/python_interpreter/config.rs +++ b/src/python_interpreter/config.rs @@ -69,7 +69,7 @@ impl InterpreterConfig { target.target_env().to_string().replace("musl", "gnu") } } - PyPy => "gnu".to_string(), + PyPy | GraalPy => "gnu".to_string(), }; match (target.target_os(), python_impl) { (Os::Linux, CPython) => { diff --git a/src/python_interpreter/get_interpreter_metadata.py b/src/python_interpreter/get_interpreter_metadata.py index 22493611c..438304056 100644 --- a/src/python_interpreter/get_interpreter_metadata.py +++ b/src/python_interpreter/get_interpreter_metadata.py @@ -33,7 +33,7 @@ def get_abi_tag(): abi = "-".join(soabi.split("-")[:3]) return abi.replace(".", "_").replace("-", "_") else: - return (sysconfig.get_config_var("SOABI") or "-").split("-")[1] or None, + return (sysconfig.get_config_var("SOABI") or "-").split("-")[1] metadata = { @@ -47,7 +47,7 @@ def get_abi_tag(): "interpreter": platform.python_implementation().lower(), "ext_suffix": ext_suffix, "soabi": sysconfig.get_config_var("SOABI") or None, - "abi_tag": get_abi_tag(), + "abi_tag": get_abi_tag() or None, "platform": sysconfig.get_platform(), # This one isn't technically necessary, but still very useful for sanity checks "system": platform.system().lower(),