@@ -173,9 +173,6 @@ def _parse_optional_attrs(rctx, args, extra_pip_args = None):
173173 json .encode (struct (arg = rctx .attr .pip_data_exclude )),
174174 ]
175175
176- if rctx .attr .enable_implicit_namespace_pkgs :
177- args .append ("--enable_implicit_namespace_pkgs" )
178-
179176 env = {}
180177 if rctx .attr .environment != None :
181178 for key , value in rctx .attr .environment .items ():
@@ -389,6 +386,8 @@ def _whl_library_impl(rctx):
389386 metadata_name = metadata .name ,
390387 metadata_version = metadata .version ,
391388 requires_dist = metadata .requires_dist ,
389+ # TODO @aignas 2025-05-17: maybe have a build flag for this instead
390+ enable_implicit_namespace_pkgs = rctx .attr .enable_implicit_namespace_pkgs ,
392391 # TODO @aignas 2025-04-14: load through the hub:
393392 annotation = None if not rctx .attr .annotation else struct (** json .decode (rctx .read (rctx .attr .annotation ))),
394393 data_exclude = rctx .attr .pip_data_exclude ,
@@ -457,6 +456,8 @@ def _whl_library_impl(rctx):
457456 name = whl_path .basename ,
458457 dep_template = rctx .attr .dep_template or "@{}{{name}}//:{{target}}" .format (rctx .attr .repo_prefix ),
459458 entry_points = entry_points ,
459+ # TODO @aignas 2025-05-17: maybe have a build flag for this instead
460+ enable_implicit_namespace_pkgs = rctx .attr .enable_implicit_namespace_pkgs ,
460461 # TODO @aignas 2025-04-14: load through the hub:
461462 dependencies = metadata ["deps" ],
462463 dependencies_by_platform = metadata ["deps_by_platform" ],
@@ -580,7 +581,6 @@ attr makes `extra_pip_args` and `download_only` ignored.""",
580581 Label ("//python/private/pypi/whl_installer:wheel.py" ),
581582 Label ("//python/private/pypi/whl_installer:wheel_installer.py" ),
582583 Label ("//python/private/pypi/whl_installer:arguments.py" ),
583- Label ("//python/private/pypi/whl_installer:namespace_pkgs.py" ),
584584 ] + record_files .values (),
585585 ),
586586 "_rule_name" : attr .string (default = "whl_library" ),
0 commit comments