Skip to content

Commit

Permalink
Remove PYO3_NO_PYTHON hack
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Apr 15, 2022
1 parent 2558793 commit 28336cf
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/compile.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::build_context::BridgeModel;
use crate::python_interpreter::InterpreterKind;
use crate::{BuildContext, PlatformTag, PythonInterpreter};
use anyhow::{anyhow, bail, Context, Result};
use fat_macho::FatWriter;
Expand Down Expand Up @@ -213,17 +212,6 @@ fn compile_target(
// but forwarding stderr is still useful in case there some non-json error
.stderr(Stdio::inherit());

if let BridgeModel::BindingsAbi3(_, _) = bindings_crate {
let is_pypy = python_interpreter
.map(|p| p.interpreter_kind == InterpreterKind::PyPy)
.unwrap_or(false);
if !is_pypy && !target.is_windows() {
// This will make pyo3's build script only set some predefined linker
// arguments without trying to read any python configuration
build_command.env("PYO3_NO_PYTHON", "1");
}
}

if let Some(python_interpreter) = python_interpreter {
// Target python interpreter isn't runnable when cross compiling
if python_interpreter.runnable {
Expand Down

0 comments on commit 28336cf

Please sign in to comment.