Skip to content

Commit

Permalink
Merge pull request #1373 from davidhewitt/use-package-version
Browse files Browse the repository at this point in the history
gil: use CARGO_PACKAGE_VERSION env var
  • Loading branch information
davidhewitt authored Jan 10, 2021
2 parents 1303cf6 + af9a58a commit de86b2c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ impl GILGuard {
"statically instead of with a shared library.\n\n",
"Please disable the `auto-initialize` feature, for example by entering the following ",
"in your cargo.toml:\n\n",
" pyo3 = { version = \"0.13.0\", default-features = false }\n\n",
" pyo3 = { version = \"",
env!("CARGO_PKG_VERSION"),
"\", default-features = false }\n\n",
"Alternatively, compile PyO3 using a Python distribution which contains a shared ",
"libary."
));
Expand All @@ -160,7 +162,9 @@ impl GILGuard {
"The `auto-initialize` feature is not supported by PyPy.\n\n",
"Please disable the `auto-initialize` feature, for example by entering the following ",
"in your cargo.toml:\n\n",
" pyo3 = { version = \"0.13.0\", default-features = false }",
" pyo3 = { version = \"",
env!("CARGO_PKG_VERSION"),
"\", default-features = false }\n\n",
));
} else {
// extension module feature enabled and PyPy or static linking
Expand Down

0 comments on commit de86b2c

Please sign in to comment.