automagically update pyo3 version in toml examples

This commit is contained in:
mejrs 2021-06-24 12:38:15 +02:00
parent 64a0391fb1
commit cfedd87696
3 changed files with 18 additions and 5 deletions

View File

@ -150,7 +150,9 @@
//! crate-type = ["cdylib"] //! crate-type = ["cdylib"]
//! //!
//! [dependencies.pyo3] //! [dependencies.pyo3]
//! version = "0.13.2" // workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("version = \"", env!("CARGO_PKG_VERSION"), "\"")))]
#![cfg_attr(not(docsrs), doc = "version = \"*\"")]
//! features = ["extension-module"] //! features = ["extension-module"]
//! ``` //! ```
//! //!
@ -202,7 +204,9 @@
//! //!
//! ```toml //! ```toml
//! [dependencies.pyo3] //! [dependencies.pyo3]
//! version = "0.13.2" // workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("version = \"", env!("CARGO_PKG_VERSION"), "\"")))]
#![cfg_attr(not(docsrs), doc = "version = \"*\"")]
//! # this is necessary to automatically initialize the Python interpreter //! # this is necessary to automatically initialize the Python interpreter
//! features = ["auto-initialize"] //! features = ["auto-initialize"]
//! ``` //! ```

View File

@ -17,9 +17,13 @@
//! //!
//! ```toml //! ```toml
//! [dependencies] //! [dependencies]
//! # change * to the latest versions
//! num-bigint = "*" //! num-bigint = "*"
//! pyo3 = { version = "*", features = ["num-bigint"] } // workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"num-bigint\"] }")))]
#![cfg_attr(
not(docsrs),
doc = "pyo3 = { version = \"*\", features = [\"num-bigint\"] }"
)]
//! ``` //! ```
//! //!
//! Note that you must use compatible versions of num-bigint and PyO3. //! Note that you must use compatible versions of num-bigint and PyO3.

View File

@ -14,7 +14,12 @@
//! [dependencies] //! [dependencies]
//! # change * to the latest versions //! # change * to the latest versions
//! num-complex = "*" //! num-complex = "*"
//! pyo3 = { version = "*", features = ["num-complex"] } // workaround for `extended_key_value_attributes`: https://github.com/rust-lang/rust/issues/82768#issuecomment-803935643
#![cfg_attr(docsrs, cfg_attr(docsrs, doc = concat!("pyo3 = { version = \"", env!("CARGO_PKG_VERSION"), "\", features = [\"num-complex\"] }")))]
#![cfg_attr(
not(docsrs),
doc = "pyo3 = { version = \"*\", features = [\"num-complex\"] }"
)]
//! ``` //! ```
//! //!
//! Note that you must use compatible versions of num-complex and PyO3. //! Note that you must use compatible versions of num-complex and PyO3.