parameters: (self)
return_statement: return True
docstring: Detects the igraph include directory, library directory and the
          list of libraries to link to using ``pkg-config``.
docstring_summary: Detects the igraph include directory, library directory and the
          list of libraries to link to using ``pkg-config``.
docstring_tokens: Detects the igraph include directory library directory and the list of libraries to link to using pkg - config .
function: def detect_from_pkgconfig(self):
          """Detects the igraph include directory, library directory and the
          list of libraries to link to using ``pkg-config``."""
          if not buildcfg.has_pkgconfig:
              return False
  
          cmd = ["pkg-config", "igraph", "--cflags", "--libs"]
          if self.static_extension:
              cmd += ["--static"]
          line, exit_code = get_output_single_line(cmd)
          if exit_code > 0 or len(line) == 0:
              return False
  
          opts = line.strip().split()
          self.libraries = [opt[2:] for opt in opts if opt.startswith("-l")]
          self.library_dirs = [opt[2:] for opt in opts if opt.startswith("-L")]
          self.include_dirs = [opt[2:] for opt in opts if opt.startswith("-I")]
          return True
function_tokens: def detect_from_pkgconfig ( self ) : if not buildcfg . has_pkgconfig : return False cmd = [ "pkg-config" , "igraph" , "--cflags" , "--libs" ] if self . static_extension : cmd += [ "--static" ] line , exit_code = get_output_single_line ( cmd ) if exit_code > 0 or len ( line ) == 0 : return False opts = line . strip ( ) . split ( ) self . libraries = [ opt [ 2 : ] for opt in opts if opt . startswith ( "-l" ) ] self . library_dirs = [ opt [ 2 : ] for opt in opts if opt . startswith ( "-L" ) ] self . include_dirs = [ opt [ 2 : ] for opt in opts if opt . startswith ( "-I" ) ] return True