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 Mar 13, 2022
1 parent 0c96687 commit 1f9b28d
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
Expand Up @@ -178,7 +178,6 @@ fn compile_target(

let pythonxy_lib_folder;
if let BridgeModel::BindingsAbi3(_, _) = bindings_crate {
// NB: We set PYO3_NO_PYTHON further below.
// On linux, we can build a shared library without the python
// providing these symbols being present, on mac we can do it with
// the `-undefined dynamic_lookup` we use above anyway. On windows
Expand Down Expand Up @@ -233,17 +232,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 {
// 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 1f9b28d

Please sign in to comment.