diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock index e292528dc0..800aeb01b8 100644 --- a/examples/bzlmod/MODULE.bazel.lock +++ b/examples/bzlmod/MODULE.bazel.lock @@ -1231,7 +1231,7 @@ }, "@@rules_python~//python/extensions:pip.bzl%pip": { "general": { - "bzlTransitiveDigest": "R4UDOUIolqXHNPsTlMq16g3t0xLeGMK/p7Ou1Cziz04=", + "bzlTransitiveDigest": "YMoII3MBUYQgraGlNXhLCnXGOv0HMK09DMpgESyf3JI=", "usagesDigest": "MChlcSw99EuW3K7OOoMcXQIdcJnEh6YmfyjJm+9mxIg=", "recordedFileInputs": { "@@other_module~//requirements_lock_3_11.txt": "a7d0061366569043d5efcf80e34a32c732679367cb3c831c4cdc606adc36d314", @@ -6138,7 +6138,7 @@ }, "@@rules_python~//python/private/pypi:pip.bzl%pip_internal": { "general": { - "bzlTransitiveDigest": "8o/oP53WcjE/4DQ4VQ0l0IVCa/i3A1mTDmN05qwm0yM=", + "bzlTransitiveDigest": "B6W/lsnMpteKi0K83y1zDkcM6X3/JBR23HYp9GWPcuY=", "usagesDigest": "Y8ihY+R57BAFhalrVLVdJFrpwlbsiKz9JPJ99ljF7HA=", "recordedFileInputs": { "@@rules_python~//tools/publish/requirements.txt": "031e35d03dde03ae6305fe4b3d1f58ad7bdad857379752deede0f93649991b8a", diff --git a/examples/pip_parse_vendored/requirements.bzl b/examples/pip_parse_vendored/requirements.bzl index 50bfe9fe8e..a64f10c27c 100644 --- a/examples/pip_parse_vendored/requirements.bzl +++ b/examples/pip_parse_vendored/requirements.bzl @@ -3,8 +3,7 @@ @generated by rules_python pip_parse repository rule. """ -load("@rules_python//python:pip.bzl", "pip_utils") -load("@rules_python//python/pip_install:pip_repository.bzl", "group_library", "whl_library") +load("@rules_python//python:pip.bzl", "group_library", "pip_utils", "whl_library") all_requirements = [ "@my_project_pip_deps_vendored_certifi//:pkg", diff --git a/gazelle/manifest/defs.bzl b/gazelle/manifest/defs.bzl index eacf1c18cf..3a65bffec4 100644 --- a/gazelle/manifest/defs.bzl +++ b/gazelle/manifest/defs.bzl @@ -39,7 +39,7 @@ def gazelle_python_manifest( manifest, meaning testing it is just as expensive as generating it, but modifying it is much less likely to result in a merge conflict. pip_repository_name: the name of the pip_install or pip_repository target. - pip_deps_repository_name: deprecated - the old pip_install target name. + pip_deps_repository_name: deprecated - the old {bzl:obj}`pip_parse` target name. manifest: the Gazelle manifest file. defaults to the same value as manifest. **kwargs: other bazel attributes passed to the generate and test targets diff --git a/gazelle/manifest/generate/generate.go b/gazelle/manifest/generate/generate.go index 19ca08a2d6..27cf2a21d8 100644 --- a/gazelle/manifest/generate/generate.go +++ b/gazelle/manifest/generate/generate.go @@ -55,7 +55,7 @@ func main() { &pipRepositoryName, "pip-repository-name", "", - "The name of the pip_install or pip_repository target.") + "The name of the pip_parse or pip.parse target.") flag.StringVar( &modulesMappingPath, "modules-mapping", diff --git a/internal_setup.bzl b/internal_setup.bzl index 3029c1546f..0e28a30e70 100644 --- a/internal_setup.bzl +++ b/internal_setup.bzl @@ -42,7 +42,6 @@ def rules_python_internal_setup(): python_versions = sorted(TOOL_VERSIONS.keys()), ) - # Because we don't use the pip_install rule, we have to call this to fetch its deps pypi_deps() bazel_skylib_workspace() diff --git a/python/extensions/pip.bzl b/python/extensions/pip.bzl index e9d47263d5..62a51c67ea 100644 --- a/python/extensions/pip.bzl +++ b/python/extensions/pip.bzl @@ -12,7 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -"pip module extension for use with bzlmod" +""" +This is the successor to {bzl:obj}`pip_parse` for including third party PyPI dependencies into your bazel module using `bzlmod`. + +:::{seealso} +For user documentation see the [PyPI dependencies section](pypi-dependencies). +::: +""" load("//python/private/pypi:pip.bzl", _pip = "pip") diff --git a/python/private/pypi/extension.bzl b/python/private/pypi/extension.bzl index 36fb20e030..6f8ca587c1 100644 --- a/python/private/pypi/extension.bzl +++ b/python/private/pypi/extension.bzl @@ -764,8 +764,7 @@ the BUILD files for wheels. attrs = _pip_parse_ext_attrs(), doc = """\ This tag class is used to create a pip hub and all of the spokes that are part of that hub. -This tag class reuses most of the pip attributes that are found in -@rules_python//python/pip_install:pip_repository.bzl. +This tag class reuses most of the attributes found in {bzl:obj}`pip_parse`. The exception is it does not use the arg 'repo_prefix'. We set the repository prefix for the user and the alias arg is always True in bzlmod. """, @@ -814,8 +813,7 @@ the BUILD files for wheels. ), doc = """\ This tag class is used to create a pypi hub and all of the spokes that are part of that hub. -This tag class reuses most of the pypi attributes that are found in -@rules_python//python/pip_install:pip_repository.bzl. +This tag class reuses most of the attributes found in {bzl:obj}`pip_parse`. The exception is it does not use the arg 'repo_prefix'. We set the repository prefix for the user and the alias arg is always True in bzlmod. """,