Skip to content

Commit 4914372

Browse files
committed
Rename PYO3_NO_INTERPRETER by PYO3_NO_PYTHON
1 parent 6da6bc9 commit 4914372

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

build.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,9 @@ fn abi3_without_interpreter() -> Result<()> {
849849
}
850850

851851
fn main() -> Result<()> {
852-
// If PYO3_NO_INTEPRETER is set with abi3, we can build PyO3 without calling Python (UNIX only).
853-
if env::var_os("PYO3_NO_INTERPRETER").is_some()
852+
// If PYO3_NO_PYTHON is set with abi3, we can build PyO3 without calling Python (UNIX only).
853+
// We only check for the abi3-py3{ABI3_MAX_MINOR} because lower versions depend on it.
854+
if env::var_os("PYO3_NO_PYTHON").is_some()
854855
&& env::var_os(format!("CARGO_FEATURE_ABI3_PY3{}", ABI3_MAX_MINOR)).is_some()
855856
{
856857
return abi3_without_interpreter();

guide/src/building_and_distribution.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ If you set more that one of these api version feature flags the highest version
6666
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.
6767

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

7171
## Cross Compiling
7272

0 commit comments

Comments
 (0)