class_docstr: Class responsible for downloading and building the C core of igraph
  if it is not installed yet, assuming that the C core uses CMake as the
  build tool. This is the case from igraph 0.9.
class_docstr_tok: ["Class","responsible","for","downloading","and","building","the","C","core","of","igraph","if","it","is","not","installed","yet",",","assuming","that","the","C","core","uses","CMake","as","the","build","tool",".","This","is","the","case","from","igraph","0.9","."]
code: def _compile_in(
      self,
      source_folder: Path,
      build_folder: Path,
      install_folder: Path,
  ) -> Union[bool, List[str]]:
      cmake = which("cmake")
      if not cmake:
          print(
              "igraph uses CMake as the build system. You need to install CMake "
              "before compiling igraph."
          )
          return False
  
      build_to_source_folder = os.path.relpath(
          source_folder, build_folder
      )
  
      print("Configuring build...")
      args = [cmake]
      cmake_build_mode = "Release"
  
      # Build to wasm requires invocation of the Emscripten SDK
      if building_with_emscripten():
          emcmake = which("emcmake")
          if not emcmake:
              print(
                  "You need to install emcmake from the Emscripten SDK before "
                  "compiling igraph."
              )
              return False
          args.insert(0, emcmake)
          args.append("-DIGRAPH_WARNINGS_AS_ERRORS:BOOL=OFF")
          args.append("-DIGRAPH_GRAPHML_SUPPORT:BOOL=OFF")
  
      # Build the Python interface with vendored libraries
      for deps in "ARPACK BLAS GLPK GMP LAPACK".split():
          args.append("-DIGRAPH_USE_INTERNAL_" + deps + "=ON")
  
      # -fPIC is needed on Linux so we can link to a static igraph lib from a
      # Python shared library
      args.append("-DCMAKE_POSITION_INDEPENDENT_CODE=ON")
  
      # No need to build tests
      args.append("-DBUILD_TESTING=OFF")
  
      # Do not treat compilation warnings as errors in case someone is trying
      # to "pip install" igraph in an environment for which we don't provide
      # wheels and the compiler complains about harmless things
      args.append("-DIGRAPH_WARNINGS_AS_ERRORS=OFF")
  
      # Set install directory during config step instead of install step in order
      # to avoid having the architecture name in the LIBPATH (e.g. lib/x86_64-linux-gnu)
      args.append("-DCMAKE_INSTALL_PREFIX=" + str(install_folder))
  
      # On macOS, compile the C core with the same macOS deployment target as
      # the one that was used to compile Python itself
      if sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET"):
          args.append(
              "-DCMAKE_OSX_DEPLOYMENT_TARGET="
              + sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
          )
  
      # Compile the C core with sanitizers if needed
      if building_with_sanitizers():
          args.append("-DUSE_SANITIZER=Address;Undefined")
          args.append("-DFLEX_KEEP_LINE_NUMBERS=ON")
          cmake_build_mode = "Debug"
  
      # Add any extra CMake args from environment variables
      if "IGRAPH_CMAKE_EXTRA_ARGS" in os.environ:
          args.extend(
              shlex.split(
                  os.environ["IGRAPH_CMAKE_EXTRA_ARGS"],
                  posix=not building_on_windows_msvc(),
              )
          )
  
      # Finally, add the source folder path
      args.append(str(build_to_source_folder))
  
      retcode = subprocess.call(args)
      if retcode:
          return False
  
      print("Running build...")
      # We are _not_ using a parallel build; this is intentional, see igraph/igraph#1755
      retcode = subprocess.call(
          [cmake, "--build", ".", "--config", cmake_build_mode]
      )
      if retcode:
          return False
  
      print("Installing build...")
      retcode = subprocess.call(
          [
              cmake,
              "--install",
              ".",
              "--config",
              cmake_build_mode,
          ]
      )
      if retcode:
          return False
  
      for candidate in install_folder.rglob("igraph.pc"):
          return self._parse_pkgconfig_file(candidate)
  
      raise RuntimeError(
          "no igraph.pc was found in the installation folder of igraph"
      )
  
imports: import os
  import platform
  import sys
  from setuptools import find_packages, setup, Command, Extension
  import glob
  import shlex
  import shutil
  import subprocess
  import sysconfig
  from contextlib import contextmanager
  from pathlib import Path
  from select import select
  from shutil import which
  from time import sleep
  from typing import List, Iterable, Iterator, Optional, Tuple, TypeVar, Union
label_desc: Use image node_id 2 for calling the IgraphCCoreCMakeBuilder obj's underlying member method code with example usage: obj._compile_in(source_folder, build_folder, install_folder) and returns: False, False, False, False, self, False