///
/// Format the python version as a triple e.g. 3.6.dev
///
Format the python version as a triple e.g.
Format the python version as a triple e . g .
fn format_python_version(version: PythonVersion) -> std::string::String {
    let version_string = format!("{}.{}", version.major, version.minor);
    if version.patch.is_some() {
        let patch = version.patch.unwrap();
        // test if we are building a `-dev` python
        if patch.parse::<u32>().is_err() {
            format!("{}-{}", version_string, patch.to_lowercase())
        } else {
            format!("{}.{}", version_string, patch)
        }
    } else {
        version_string
    }
}
fn format_python_version ( version : PythonVersion ) -> std :: string :: String { let version_string = format ! ( " " version major version minor ) ; if version . patch . is_some ( ) { let patch = version . patch . unwrap ( ) ; // test if we are building a `-dev` python if patch . parse :: < u32 > ( ) . is_err ( ) { format ! ( " " version_string patch to_lowercase ( ) ) } else { format ! ( " " version_string patch ) } } else { version_string } }
Format the python version as a triple e.g.
Format the python version as a triple e . g .
version
PythonVersion