python-config-rs 0.1.2

Python distribution information via python3-config. This crate provides a Rust interface to your system's Python distribution information. Our goal is for this to be useful in build scripts, or in any application where getting the Python include directories, linker flags, or compile flags is necessary. This crate also provides a reimplementation of python3-config, the script, that can query configuration information about your distribution. The binary only needs a Python interpreter. We show that our binary is API compatible with existing `python3-config` scripts. See the repsitory for more project information.
Documentation
//! Helper macros for working with inline Python scripts

/// Adds a prefixing tab to the input string
///
/// This is nifty, because 'tab!' takes up four
/// characters, the same amount as a tab. Visually,
/// it looks better than just '\t' in your string.
macro_rules! tab {
    ($($e:expr),*) => {
        concat!("\t", $($e)*)
    };
}

macro_rules! target_line {
    ($target:expr, $line:expr) => {
        if cfg!(target_os = $target) {
            $line
        } else {
            ""
        }
    };
}

/// Sets an individual script line that only evaluates
/// on Linux.
macro_rules! linux_line {
    ($line:expr) => {
        target_line!("linux", $line)
    };
}

/// Sets an individual script line that only evaluates
/// on macOS
macro_rules! macos_line {
    ($line:expr) => {
        target_line!("macos", $line)
    };
}