Skip to content

Commit

Permalink
Document needing resolve-config for pyo3 cfgs
Browse files Browse the repository at this point in the history
  • Loading branch information
smheidrich authored and davidhewitt committed Sep 29, 2022
1 parent 9b42daa commit faf1f0e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ To see a full reference of all the `#[cfg]` flags provided, see the [`pyo3-build

You can use the `#[cfg]` flags in just two steps:

1. Add `pyo3-build-config` it to your crate's build dependencies in `Cargo.toml`:
1. Add `pyo3-build-config` with the [`resolve-config`](../features.md#resolve-config) feature enabled to your crate's build dependencies in `Cargo.toml`:

```toml
[build-dependencies]
pyo3-build-config = { {{#PYO3_CRATE_VERSION}} }
pyo3-build-config = { {{#PYO3_CRATE_VERSION}}, features = ["resolve-config"] }
```

2. Add a [`build.rs`](https://doc.rust-lang.org/cargo/reference/build-scripts.html) file to your crate with the following contents:
Expand Down

0 comments on commit faf1f0e

Please sign in to comment.