diff --git a/build/configure/src/aqt.rs b/build/configure/src/aqt.rs index 6db85bf2b..3e88074bf 100644 --- a/build/configure/src/aqt.rs +++ b/build/configure/src/aqt.rs @@ -4,7 +4,7 @@ use ninja_gen::{ action::BuildAction, command::RunCommand, - copy::CopyFiles, + copy::{CopyFile, CopyFiles}, glob, hashmap, inputs, node::{CompileSass, EsbuildScript, TypescriptCheck}, python::{python_format, PythonTest}, @@ -90,6 +90,15 @@ fn build_generated_sources(build: &mut Build) -> Result<()> { }, }, )?; + // we need to add a py.typed file to the generated sources, or mypy + // will ignore them when used with the generated wheel + build.add( + "qt/aqt:py.typed", + CopyFile { + input: "qt/aqt/py.typed".into(), + output: "qt/_aqt/py.typed", + }, + )?; Ok(()) }