From e74aa34d2cd1525ca24e10455a7ae4ee903d6b32 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Tue, 17 Jan 2023 21:52:25 +0100 Subject: [PATCH] Use the extension_name in develop builds This is the same now as for non-develop builds. If a user sets `package.metadata.maturin` the import in other Python files will reference that name. For develop builds to also work it needs to have the same name. --- src/module_writer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/module_writer.rs b/src/module_writer.rs index fe628f3e7..ba41d0fc7 100644 --- a/src/module_writer.rs +++ b/src/module_writer.rs @@ -964,7 +964,7 @@ pub fn write_uniffi_module( let module; if let Some(python_module) = &project_layout.python_module { if editable { - let base_path = python_module.join(module_name); + let base_path = python_module.join(&project_layout.extension_name); fs::create_dir_all(&base_path)?; let target = base_path.join(&cdylib); fs::copy(artifact, &target).context(format!(