(self)
return True
Compiles igraph from the vendored source code inside `vendor/source/igraph`.
        This folder typically comes from a git submodule.
Compiles igraph from the vendored source code inside `vendor/source/igraph`.
        This folder typically comes from a git submodule.
Compiles igraph from the vendored source code inside vendor / source / igraph . This folder typically comes from a git submodule .
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:
            print("Build failed for the C core of igraph.")
            print("")
            sys.exit(1)

        assert not isinstance(libraries, bool)

        igraph_builder.create_build_config_file(install_folder, libraries)

        self.use_vendored_igraph()
        return True
def compile_igraph_from_vendor_source ( self ) -> bool : 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 : print ( "Build failed for the C core of igraph." ) print ( "" ) sys . exit ( 1 ) assert not isinstance ( libraries , bool ) igraph_builder . create_build_config_file ( install_folder , libraries ) self . use_vendored_igraph ( ) return True