Skip to content

Commit

Permalink
chore: improve the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aignas committed Oct 16, 2024
1 parent e232a5d commit d166d47
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions examples/bzlmod/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions examples/pip_parse_vendored/requirements.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion gazelle/manifest/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gazelle/manifest/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion internal_setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 7 additions & 1 deletion python/extensions/pip.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
6 changes: 2 additions & 4 deletions python/private/pypi/extension.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
""",
Expand Down Expand Up @@ -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.
""",
Expand Down

0 comments on commit d166d47

Please sign in to comment.