(self)
return True
Detects the igraph include directory, library directory and the
        list of libraries to link to using ``pkg-config``.
Detects the igraph include directory, library directory and the
        list of libraries to link to using ``pkg-config``.
Detects the igraph include directory library directory and the list of libraries to link to using pkg - config .
def detect_from_pkgconfig(self) -> bool:
        """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
def detect_from_pkgconfig ( self ) -> bool : 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