Skip to content

Commit

Permalink
pyo3-build-config: rebuild when PYO3_PYTHON_VERSION/`PYO3_PYTHON_…
Browse files Browse the repository at this point in the history
…IMPLEMENTATION` changed
  • Loading branch information
messense committed Nov 9, 2022
1 parent 4b7e0ee commit 21fa094
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,8 @@ fn get_env_interpreter() -> Option<PathBuf> {
/// 4. `python3`, as above
pub fn find_interpreter() -> Result<PathBuf> {
if let Some(exe) = env_var("PYO3_PYTHON") {
println!("cargo:rerun-if-env-changed=PYO3_PYTHON_VERSION");
println!("cargo:rerun-if-env-changed=PYO3_PYTHON_IMPLEMENTATION");
Ok(exe.into())
} else if let Some(env_interpreter) = get_env_interpreter() {
Ok(env_interpreter)
Expand Down

0 comments on commit 21fa094

Please sign in to comment.