fn config_file() -> Result<Option<InterpreterConfig>> {
    if let Some(path) = env_var("PYO3_CONFIG_FILE") {
        let path = Path::new(&path);
        println!("cargo:rerun-if-changed={}", path.display());
        // Absolute path is necessary because this build script is run with a cwd different to the
        // original `cargo build` instruction.
        ensure!(
            path.is_absolute(),
            "PYO3_CONFIG_FILE must be an absolute path"
        );

        let interpreter_config = InterpreterConfig::from_path(path)
            .context("failed to parse contents of PYO3_CONFIG_FILE")?;
        Ok(Some(interpreter_config))
    } else {
        Ok(None)
    }
}
/// If PYO3_CONFIG_FILE is set, copy it into the crate.
If PYO3_CONFIG_FILE is set, copy it into the crate.
If PYO3_CONFIG_FILE is set copy it into the crate .
fn config_file() -> Result<Option<InterpreterConfig>> {
    if let Some(path) = env_var("PYO3_CONFIG_FILE") {
        let path = Path::new(&path);
        println!("cargo:rerun-if-changed={}", path.display());
        // Absolute path is necessary because this build script is run with a cwd different to the
        // original `cargo build` instruction.
        ensure!(
            path.is_absolute(),
            "PYO3_CONFIG_FILE must be an absolute path"
        );
        let interpreter_config = InterpreterConfig::from_path(path)
            .context("failed to parse contents of PYO3_CONFIG_FILE")?;
        Ok(Some(interpreter_config))
    } else {
        Ok(None)
    }
}
fn config_file ( ) -> Result < Option < InterpreterConfig > > { if let Some ( path ) = env_var ( " " ) { let path = Path :: new ( & path ) ; println ! ( " " path display ( ) ) ; // Absolute path is necessary because this build script is run with a cwd different to the // original `cargo build` instruction. ensure ! ( path is_absolute ( ) " " ) ; let interpreter_config = InterpreterConfig :: from_path ( path ) . context ( " " ) ? ; Ok ( Some ( interpreter_config ) ) } else { Ok ( None ) } }
If PYO3_CONFIG_FILE is set, copy it into the crate.
If PYO3_CONFIG_FILE is set copy it into the crate .