docstr: Compiles igraph from the vendored source code inside `vendor/source/igraph`.
  This folder typically comes from a git submodule.
docstr_tok: ["Compiles","igraph","from","the","vendored","source","code","inside","`","vendor\/source\/igraph","`",".","This","folder","typically","comes","from","a","git","submodule","."]
code: def compile_igraph_from_vendor_source(self) -> bool:
      """Compiles igraph from the vendored source code inside `vendor/source/igraph`.
      This folder typically comes from a git submodule.
      """
      vendor_folder = Path("vendor")
      source_folder = vendor_folder / "source" / "igraph"
      build_folder = vendor_folder / "build" / "igraph"
      install_folder = vendor_folder / "install" / "igraph"
  
      if install_folder.exists():
          # Vendored igraph already compiled and installed, just use it
          self.use_vendored_igraph()
          return True
  
      if (source_folder / "CMakeLists.txt").exists():
          igraph_builder = IgraphCCoreCMakeBuilder()
      else:
          print(
              "Cannot find vendored igraph source in {0}".format(
                  source_folder
              )
          )
          print("")
          return False
  
      print("We are going to build the C core of igraph.")
      print("  Source folder: {0}".format(source_folder))
      print("  Build folder: {0}".format(build_folder))
      print("  Install folder: {0}".format(install_folder))
      print("")
  
      source_folder = source_folder.resolve()
      build_folder = build_folder.resolve()
      install_folder = install_folder.resolve()
  
      Path(build_folder).mkdir(parents=True, exist_ok=True)
  
      libraries = igraph_builder.compile_in(
          source_folder=source_folder,
          build_folder=build_folder,
          install_folder=install_folder,
      )
  
      if libraries is False:
          fail("Build failed for the C core of igraph.")
  
      assert not isinstance(libraries, bool)
  
      igraph_builder.create_build_config_file(install_folder, libraries)
  
      self.use_vendored_igraph()
      return True
  
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 6 for calling the BuildConfiguration obj's underlying member method code with example usage: obj.compile_igraph_from_vendor_source() and returns: True, True, False