@@ -91,6 +91,36 @@ def _internal_dev_deps_impl(mctx):
9191 enable_implicit_namespace_pkgs = False ,
9292 )
9393
94+ _whl_library_from_dir (
95+ name = "whl_library_extras_direct_dep" ,
96+ root = "//tests/pypi/whl_library/testdata/pkg:BUILD.bazel" ,
97+ output = "pkg-1.0-any-none-any.whl" ,
98+ requirement = "pkg[optional]" ,
99+ # The following is necessary to enable pipstar and make tests faster
100+ config_load = "@rules_python//tests/pypi/whl_library/testdata:packages.bzl" ,
101+ dep_template = "@whl_library_extras_{name}//:{target}" ,
102+ )
103+ _whl_library_from_dir (
104+ name = "whl_library_extras_optional_dep" ,
105+ root = "//tests/pypi/whl_library/testdata/optional_dep:BUILD.bazel" ,
106+ output = "optional_dep-1.0-any-none-any.whl" ,
107+ requirement = "optional_dep" ,
108+ # The following is necessary to enable pipstar and make tests faster
109+ config_load = "@rules_python//tests/pypi/whl_library/testdata:packages.bzl" ,
110+ )
111+
112+ def _whl_library_from_dir (* , name , output , root , ** kwargs ):
113+ whl_from_dir_repo (
114+ name = "{}_whl" .format (name ),
115+ root = root ,
116+ output = output ,
117+ )
118+ whl_library (
119+ name = name ,
120+ whl_file = "@{}_whl//:{}" .format (name , output ),
121+ ** kwargs
122+ )
123+
94124internal_dev_deps = module_extension (
95125 implementation = _internal_dev_deps_impl ,
96126 doc = "This extension creates internal rules_python dev dependencies." ,
0 commit comments