From f9b4423f4c41040c2a093d511eac7913833cb813 Mon Sep 17 00:00:00 2001 From: David Vo Date: Wed, 1 Jan 2025 03:50:44 +1100 Subject: [PATCH] build_ext: Support C++ for RPYBUILD_CC_LAUNCHER (#244) setuptools v72.2.0 added realer support for C++, which includes understanding the C++ compiler usually has a different name. https://github.com/pypa/setuptools/commit/2c937116cc0dcd9b26b6070e89a3dc5dcbedc2ae --- robotpy_build/command/build_ext.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/robotpy_build/command/build_ext.py b/robotpy_build/command/build_ext.py index 6cf146ce..de8e6709 100644 --- a/robotpy_build/command/build_ext.py +++ b/robotpy_build/command/build_ext.py @@ -107,6 +107,11 @@ def build_extensions(self): if cc_launcher: self.compiler.compiler.insert(0, cc_launcher) self.compiler.compiler_so.insert(0, cc_launcher) + try: + # setuptools v72.2.0 added C++ support + self.compiler.compiler_so_cxx.insert(0, cc_launcher) + except AttributeError: + pass # compiler_cxx is only used for linking, so we don't mess with it # .. distutils is so weird # self.compiler.compiler_cxx.insert(0, cc_launcher)