Commit graph

2 commits

Author SHA1 Message Date
konstin cb6c287f1f Expect the pyo3 crate to be in scope for the codegen
This allows using generated code from crates that do not directly depend on pyo3.

E.g.:

```rust
extern crate my_pyo3_wrapper;

use my_pyo3_wrapper::pyo3;

#[py::modinit(rust2py)]
fn init_mod(py: Python, m: &PyModule) -> PyResult<()> {
    // ...
    Ok(())
}
2018-05-01 20:24:34 +02:00
konstin 29fdc05b60 Move the codegen into its own crate
This makes the code generatioin reusable from third party crates.
2018-05-01 20:24:32 +02:00