fn fun_with_abiflags(
    message: &IntepreterMetadataMessage,
    target: &Target,
    bridge: &BridgeModel,
) -> Result<String> {
    if bridge != &BridgeModel::Cffi {
        let sane_platform = match message.platform.as_ref() {
            "windows" => target.is_windows(),
            "linux" => target.is_linux(),
            "darwin" => target.is_macos(),
            "freebsd" => target.is_freebsd(),
            _ => false,
        };

        if !sane_platform {
            bail!(
                "sys.platform in python, {}, and the rust target, {:?}, don't match ಠ_ಠ",
                message.platform,
                target,
            )
        }
    }

    if message.major != 3 || message.minor < 5 {
        bail!(
            "Only python >= 3.5 is supported, while you're using python {}.{}",
            message.major,
            message.minor
        );
    }

    if message.interpreter == "pypy" {
        // pypy does not specify abi flags
        Ok("".to_string())
    } else if message.platform == "windows" {
        if message.abiflags.is_some() {
            bail!("A python 3 interpreter on windows does not define abiflags in its sysconfig ಠ_ಠ")
        } else {
            Ok("".to_string())
        }
    } else if let Some(ref abiflags) = message.abiflags {
        if message.minor >= 8 {
            // for 3.8, "builds with and without pymalloc are ABI compatible" and the flag dropped
            Ok(abiflags.to_string())
        } else if (abiflags != "m") && (abiflags != "dm") {
            bail!("A python 3 interpreter on linux or mac os must have 'm' or 'dm' as abiflags ಠ_ಠ")
        } else {
            Ok(abiflags.to_string())
        }
    } else {
        bail!("A python 3 interpreter on linux or mac os must define abiflags in its sysconfig ಠ_ಠ")
    }
}
/// Returns the abiflags that are assembled through the message, with some
/// additional sanity checks.
///
/// The rules are as follows:
///  - python 3 + Unix: Use ABIFLAGS
///  - python 3 + Windows: No ABIFLAGS, return an empty string
Returns the abiflags that are assembled through the message, with some
additional sanity checks.

The rules are as follows:
python 3 + Unix: Use ABIFLAGS
python 3 + Windows: No ABIFLAGS, return an empty string
Returns the abiflags that are assembled through the message with some additional sanity checks . The rules are as follows : python 3 + Unix : Use ABIFLAGS python 3 + Windows : No ABIFLAGS return an empty string
fn fun_with_abiflags(
    message: &IntepreterMetadataMessage,
    target: &Target,
    bridge: &BridgeModel,
) -> Result<String> {
    if bridge != &BridgeModel::Cffi {
        let sane_platform = match message.platform.as_ref() {
            "windows" => target.is_windows(),
            "linux" => target.is_linux(),
            "darwin" => target.is_macos(),
            "freebsd" => target.is_freebsd(),
            _ => false,
        };
        if !sane_platform {
            bail!(
                "sys.platform in python, {}, and the rust target, {:?}, don't match ಠ_ಠ",
                message.platform,
                target,
            )
        }
    }
    if message.major != 3 || message.minor < 5 {
        bail!(
            "Only python >= 3.5 is supported, while you're using python {}.{}",
            message.major,
            message.minor
        );
    }
    if message.interpreter == "pypy" {
        // pypy does not specify abi flags
        Ok("".to_string())
    } else if message.platform == "windows" {
        if message.abiflags.is_some() {
            bail!("A python 3 interpreter on windows does not define abiflags in its sysconfig ಠ_ಠ")
        } else {
            Ok("".to_string())
        }
    } else if let Some(ref abiflags) = message.abiflags {
        if message.minor >= 8 {
            // for 3.8, "builds with and without pymalloc are ABI compatible" and the flag dropped
            Ok(abiflags.to_string())
        } else if (abiflags != "m") && (abiflags != "dm") {
            bail!("A python 3 interpreter on linux or mac os must have 'm' or 'dm' as abiflags ಠ_ಠ")
        } else {
            Ok(abiflags.to_string())
        }
    } else {
        bail!("A python 3 interpreter on linux or mac os must define abiflags in its sysconfig ಠ_ಠ")
    }
}
fn fun_with_abiflags ( message : & IntepreterMetadataMessage , target : & Target , bridge : & BridgeModel , ) -> Result < String > { if bridge != & BridgeModel :: Cffi { let sane_platform = match message . platform . as_ref ( ) { " " => target . is_windows ( ) , " " => target . is_linux ( ) , " " => target . is_macos ( ) , " " => target . is_freebsd ( ) , _ => false , } ; if ! sane_platform { bail ! ( " message platform target ) } } if message . major != 3 || message . minor < 5 { bail ! ( " " message major message minor ) ; } if message . interpreter == " " { // pypy does not specify abi flags Ok ( " " . to_string ( ) ) } else if message . platform == " " { if message . abiflags . is_some ( ) { bail ! ( " } else { Ok ( " " . to_string ( ) ) } } else if let Some ( ref abiflags ) = message . abiflags { if message . minor >= 8 { // for 3.8, "builds with and without pymalloc are ABI compatible" and the flag dropped Ok ( abiflags . to_string ( ) ) } else if ( abiflags != " " ) && ( abiflags != " " ) { bail ! ( " } else { Ok ( abiflags . to_string ( ) ) } } else { bail ! ( " } }
Returns the abiflags that are assembled through the message, with some
additional sanity checks.
Returns the abiflags that are assembled through the message with some additional sanity checks .
message
&IntepreterMetadataMessage
target
&Target
bridge
&BridgeModel
message
&IntepreterMetadataMessage
target
&Target
bridge
&BridgeModel