(root: &Path, rel: &str, bytes: &[u8])
| 175 | } |
| 176 | |
| 177 | fn write_under(root: &Path, rel: &str, bytes: &[u8]) -> Result<()> { |
| 178 | let path = root.join(rel); |
| 179 | if let Some(p) = path.parent() { |
| 180 | fs::create_dir_all(p)?; |
| 181 | } |
| 182 | fs::write(&path, bytes)?; |
| 183 | Ok(()) |
| 184 | } |
| 185 | |
| 186 | /// Copy each `.py` preserving its path under the project root. |
| 187 | fn copy_scripts(scripts: &[PathBuf], project: &Path, out_dir: &Path) -> Result<usize> { |