--- plotext-6.1.0.orig/build_cpp.py +++ plotext-6.1.0/build_cpp.py @@ -1,4 +1,5 @@ import os +import shlex import pathlib import platform import subprocess @@ -49,7 +50,7 @@ def compile_kernel(): "[plotext] Install a ready made version instead, with pip install plotext, or install the MSVC build tools and try again.") else: out = cpp_folder / "kernel.so" - cmd = ["g++", "-fPIC", "-shared", # the standard is named, older compilers defaulting to one this kernel does not compile under + cmd = shlex.split(os.environ.get("CXX", "g++")) + ["-fPIC", "-shared", # the standard is named, older compilers defaulting to one this kernel does not compile under "-O2", "-std=c++17", "-Wall", "-Wextra", "-pedantic", "-fno-stack-protector", # -pedantic names anything the standard does not allow, as an array sized while running, which Microsoft's compiler refuses outright "-o", str(out), str(cpp_source)] if platform.system() == "Darwin": # macos builds one wheel per architecture and names the wanted one here, which a raw compiler call must pass on