Skip to content

Commit 7050b3d

Browse files
committed
change module pip.parse() call, make convert_uv_lock_to_json public
1 parent 8ea581d commit 7050b3d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ dev_pip.parse(
348348
dev_pip.parse(
349349
hub_name = "uv_pypi",
350350
python_version = "3.12",
351-
requirements_lock = "//tests/uv_pypi:uv.lock",
351+
uv_lock = "//tests/uv_pypi:uv.lock",
352352
)
353353
use_repo(dev_pip, "dev_pip", "pypi_alpha", "pypi_beta", "pypiserver", "uv_pypi")
354354

python/private/pypi/uv_lock.bzl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
load("//python/private/pypi:pypi_repo_utils.bzl", "pypi_repo_utils")
22

3-
def _convert_uv_lock_to_json(mrctx, attr, logger):
3+
def convert_uv_lock_to_json(mrctx, attr, logger):
4+
"""Converts a uv.lock file to json.
5+
6+
Args:
7+
mrctx: a module_ctx or repository_ctx object.
8+
attr: The attribute struct for mrctx. It must have an
9+
`_python_interpreter_target` attribute of the interpreter
10+
to use.
11+
logger: a logger object to use
12+
13+
Returns:
14+
The command output, which is a json string.
15+
"""
416
python_interpreter = pypi_repo_utils.resolve_python_interpreter(
517
mrctx,
618
python_interpreter_target = attr._python_interpreter_target,

0 commit comments

Comments
 (0)