Skip to content

Commit

Permalink
add cargo:rerun-if-changed to build.rs, ref pydantic#176 (pydantic#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin authored Jul 27, 2022
1 parent bbc26df commit dd3ceaa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use std::process::Command;
use std::str::from_utf8;

fn generate_self_schema() {
println!("cargo:rerun-if-changed=pydantic_core/_types.py");
println!("cargo:rerun-if-changed=generate_self_schema.py");
if Path::new("./src/self_schema.py").exists() && option_env!("DEBIAN_FRONTEND") == Some("noninteractive") {
// self_schema.py already exists and DEBIAN_FRONTEND indicates we're in a maturin build,
// skip running generate_self_schema.py
Expand Down

0 comments on commit dd3ceaa

Please sign in to comment.