Skip to content

Commit

Permalink
Account for non-existent python_module folder
Browse files Browse the repository at this point in the history
  • Loading branch information
H-Plus-Time committed Dec 20, 2024
1 parent e6559ba commit a043a9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/maturin_import_hook/_resolve_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ def _resolve_project(project_dir: Path) -> MaturinProject:
python_module, extension_module_dir, extension_module_name = _resolve_rust_module(python_dir, module_full_name)
immediate_path_dependencies = _get_immediate_path_dependencies(manifest_path.parent, cargo)

package_name = ".".join(python_module.relative_to(python_dir).parts)
if not python_module.exists():
extension_module_dir = None
python_module = None
package_name = ".".join(python_module.relative_to(python_dir).parts)
package_name = module_full_name.split(".")[0]
return MaturinProject(
cargo_manifest_path=manifest_path,
module_full_name=module_full_name,
Expand Down

0 comments on commit a043a9d

Please sign in to comment.