python-config-rs
The python-config-rs
crate gives you the same insight as
the python-config
script bundled with your Python distribution.
The crate is intended for build scripts that need
python-config
```rust use python_config::PythonConfig;
let cfg = PythonConfig::new(); // Python 3
// Print include directories println!("Includes: {}", cfg.includes().unwrap()); // Print installation prefix println!("Installation prefix: {}", cfg.prefix().unwrap()); ```
This is Python 3 by default, but we provide a Python 2 interface. Note that the Python 2 interface has gone through significantly less testing.
Based on this library, we also provide a reimplementation
of python3-config
. Our automated tests show equivalence
between our implementation and the normal python3-config
script. The binary is Python 3 only.
Licensed under the Apache License, Version 2.0