(self)
Assumes that igraph is installed already in ``vendor/install/igraph`` and sets up
        the include and library paths and the library names accordingly.
Assumes that igraph is installed already in ``vendor/install/igraph`` and sets up
        the include and library paths and the library names accordingly.
Assumes that igraph is installed already in vendor / install / igraph and sets up the include and library paths and the library names accordingly .
def use_vendored_igraph(self) -> None:
        """Assumes that igraph is installed already in ``vendor/install/igraph`` and sets up
        the include and library paths and the library names accordingly."""
        building_on_windows = building_on_windows_msvc()

        vendor_dir = Path("vendor") / "install" / "igraph"

        buildcfg.include_dirs = [str(vendor_dir / "include" / "igraph")]
        buildcfg.library_dirs = []

        for candidate in ("lib", "lib64"):
            candidate = vendor_dir / candidate
            if candidate.exists():
                buildcfg.library_dirs.append(str(candidate))
                break
        else:
            raise RuntimeError(
                "cannot detect igraph library dir within " + str(vendor_dir)
            )

        if not buildcfg.static_extension:
            buildcfg.static_extension = "only_igraph"
            if building_on_windows:
                buildcfg.define_macros.append(("IGRAPH_STATIC", "1"))

        buildcfg_file = vendor_dir / "build.cfg"
        if buildcfg_file.exists():
            buildcfg.libraries = eval(buildcfg_file.open("r").read())
def use_vendored_igraph ( self ) -> None : building_on_windows = building_on_windows_msvc ( ) vendor_dir = Path ( "vendor" ) / "install" / "igraph" buildcfg . include_dirs = [ str ( vendor_dir / "include" / "igraph" ) ] buildcfg . library_dirs = [ ] for candidate in ( "lib" , "lib64" ) : candidate = vendor_dir / candidate if candidate . exists ( ) : buildcfg . library_dirs . append ( str ( candidate ) ) break else : raise RuntimeError ( "cannot detect igraph library dir within " + str ( vendor_dir ) ) if not buildcfg . static_extension : buildcfg . static_extension = "only_igraph" if building_on_windows : buildcfg . define_macros . append ( ( "IGRAPH_STATIC" , "1" ) ) buildcfg_file = vendor_dir / "build.cfg" if buildcfg_file . exists ( ) : buildcfg . libraries = eval ( buildcfg_file . open ( "r" ) . read ( ) )