@@ -26,22 +26,21 @@ def initialize(self, version: str, build_data: Dict[str, Any]) -> None:
2626 hatch_odoo_config = load_hatch_odoo_config (self .root )
2727 if version == "standard" :
2828 force_include = build_data ["force_include" ]
29- for addon_dir in iter_addon_dirs (
29+ for addon_dir , addon_name in iter_addon_dirs (
3030 self .root ,
3131 hatch_odoo_config ,
3232 # We force-include addons that are installable False to avoid that the
3333 # default hatch behaviour adds them at the wrong place in the wheel.
3434 allow_not_installable = True ,
3535 ):
36- addon_name = addon_dir .name
3736 force_include [addon_dir ] = f"odoo/addons/{ addon_name } "
3837 elif version == "editable" and self .config .get ("editable_symlinks" , True ):
3938 editable_path = Path (self .root ) / "build" / "__editable_odoo_addons__"
4039 if editable_path .is_dir ():
4140 shutil .rmtree (editable_path )
4241 editable_odoo_addons_path = editable_path / "odoo" / "addons"
4342 has_editable_symlinks = False
44- for addon_dir in iter_addon_dirs (
43+ for addon_dir , addon_name in iter_addon_dirs (
4544 self .root ,
4645 hatch_odoo_config ,
4746 allow_not_installable = False ,
@@ -50,7 +49,6 @@ def initialize(self, version: str, build_data: Dict[str, Any]) -> None:
5049 if not has_editable_symlinks :
5150 editable_odoo_addons_path .mkdir (parents = True )
5251 has_editable_symlinks = True
53- addon_name = addon_dir .name
5452 editable_addon_path = editable_odoo_addons_path / addon_name
5553 editable_addon_path .symlink_to (addon_dir )
5654 # Add .pth to build/__editable_odoo_addons__ in wheel.
0 commit comments