Skip to content

Commit

Permalink
Rename PYO3_NO_INTERPRETER by PYO3_NO_PYTHON
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu committed Dec 7, 2020
1 parent 6da6bc9 commit 4914372
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -849,8 +849,9 @@ fn abi3_without_interpreter() -> Result<()> {
}

fn main() -> Result<()> {
// If PYO3_NO_INTEPRETER is set with abi3, we can build PyO3 without calling Python (UNIX only).
if env::var_os("PYO3_NO_INTERPRETER").is_some()
// If PYO3_NO_PYTHON is set with abi3, we can build PyO3 without calling Python (UNIX only).
// We only check for the abi3-py3{ABI3_MAX_MINOR} because lower versions depend on it.
if env::var_os("PYO3_NO_PYTHON").is_some()
&& env::var_os(format!("CARGO_FEATURE_ABI3_PY3{}", ABI3_MAX_MINOR)).is_some()
{
return abi3_without_interpreter();
Expand Down
2 changes: 1 addition & 1 deletion guide/src/building_and_distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ If you set more that one of these api version feature flags the highest version
PyO3 is only able to link your extension module to api3 version up to and including your host Python version. E.g., if you set `abi3-py38` and try to compile the crate with a host of Python 3.6, the build will fail.

As an advanced feature, you can build PyO3 wheel without calling Python interpreter with
the environment variable `PYO3_NO_INTERPRETER` set, but this only works on *NIX.
the environment variable `PYO3_NO_PYTHON` set, but this only works on *NIX.

## Cross Compiling

Expand Down

0 comments on commit 4914372

Please sign in to comment.