class_docstr: A custom build extension for adding -stdlib arguments for clang++.
code: def build_extensions(self):
      # '-std=c++11' is added to `extra_compile_args` so the code can compile
      # with clang++. This works across compilers (ignored by MSVC).
      for extension in self.extensions:
          extension.extra_compile_args.append("-std=c++11")
  
      try:
          build_ext.build_extensions(self)
      except setuptools.distutils.errors.CompileError:
          # Workaround Issue #2.
          # '-stdlib=libc++' is added to `extra_compile_args` and `extra_link_args`
          # so the code can compile on macOS with Anaconda.
          for extension in self.extensions:
              extension.extra_compile_args.append("-stdlib=libc++")
              extension.extra_link_args.append("-stdlib=libc++")
          build_ext.build_extensions(self)
  
imports: import os
  import setuptools
  from setuptools import Extension, setup
  from setuptools.command.build_ext import build_ext
label_desc: Use image node_id 1 for calling the BuildExt obj's underlying member method code with example usage: obj.build_extensions() without return types