Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dev/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ multirun(
":uv_lock.update",
"//examples:bzlmod_other_module_uv_lock.update",
"//examples:bzlmod_uv_lock.update",
"//examples/wheel:requirements_server.update",
"//tests/multi_pypi/alpha:requirements.update",
"//tests/multi_pypi/beta:requirements.update",
"//tests/multiple_inputs:multiple_inputs.update",
"//tests/multiple_inputs:multiple_pyproject_toml.update",
"//tests/multiple_inputs:multiple_requirements_in.update",
"//tests/uv/lock/pyproject_toml:requirements.update",
"//tests/uv/lock/workspaces:requirements.update",
],
Expand Down
8 changes: 8 additions & 0 deletions examples/build_file_generation/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ python_register_toolchains(
python_version = "3.14",
)

load("@rules_python//python/uv:repositories.bzl", "uv_toolchains_manifest")

uv_toolchains_manifest(name = "uv_manifest")

load("@uv_manifest//:dist_manifest.bzl", "uv_register_toolchains")

uv_register_toolchains(name = "uv")

load("@rules_python//python:pip.bzl", "pip_parse")

# This macro wraps the `pip_repository` rule that invokes `pip`, with `incremental` set.
Expand Down
2 changes: 1 addition & 1 deletion examples/build_file_generation/gazelle_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ manifest:
werkzeug: werkzeug
pip_repository:
name: pip
integrity: 256024227c088d508adca72c8a0b148a9945b856ef1a70716fc43a643f9b324d
integrity: 058d2c136aba6659b5ee8f2faa346b29e1b8d96a2fc0b14e4a7c930ca1836019
12 changes: 4 additions & 8 deletions examples/build_file_generation/requirements_lock.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.14
# by the following command:
#
# This file was autogenerated by uv via the following command:
# bazel run //:requirements.update
#
alabaster==1.0.0 \
--hash=sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e \
--hash=sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b
Expand Down Expand Up @@ -205,7 +201,7 @@ docutils==0.22.4 \
flask==3.1.3 \
--hash=sha256:0ef0e52b8a9cd932855379197dd8f94047b359ca0a78695144304cb45f87c9eb \
--hash=sha256:f4bcbefc124291925f1a26446da31a5178f9483862233b23c0c96a20701f670c
# via build_file_generation (pyproject.toml)
# via build-file-generation (pyproject.toml)
idna==3.19 \
--hash=sha256:5e0811a4383b21dc5838069f801c4fb62113b7447663d2530d2bd6e77b49bf15 \
--hash=sha256:815e7be7a7806d54abb586dc943addc79e8b2ee16915059658cbeff4b1b43bf4
Expand Down Expand Up @@ -341,7 +337,7 @@ snowballstemmer==3.1.1 \
sphinx==9.1.0 \
--hash=sha256:7741722357dd75f8190766926071fed3bdc211c74dd2d7d4df5404da95930ddb \
--hash=sha256:c84fdd4e782504495fe4f2c0b3413d6c2bf388589bb352d439b2a3bb99991978
# via build_file_generation (pyproject.toml)
# via build-file-generation (pyproject.toml)
sphinxcontrib-applehelp==2.0.0 \
--hash=sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1 \
--hash=sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5
Expand All @@ -366,7 +362,7 @@ sphinxcontrib-serializinghtml==2.0.0 \
--hash=sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331 \
--hash=sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d
# via
# build_file_generation (pyproject.toml)
# build-file-generation (pyproject.toml)
# sphinx
urllib3==2.8.0 \
--hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \
Expand Down
14 changes: 5 additions & 9 deletions examples/build_file_generation/requirements_windows.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.14
# by the following command:
#
# bazel run //:requirements.update
#
# This file was autogenerated by uv via the following command:
# bazel run //:requirements_windows.update
alabaster==1.0.0 \
--hash=sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e \
--hash=sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b
Expand Down Expand Up @@ -211,7 +207,7 @@ docutils==0.22.4 \
flask==3.1.3 \
--hash=sha256:0ef0e52b8a9cd932855379197dd8f94047b359ca0a78695144304cb45f87c9eb \
--hash=sha256:f4bcbefc124291925f1a26446da31a5178f9483862233b23c0c96a20701f670c
# via build_file_generation (pyproject.toml)
# via build-file-generation (pyproject.toml)
idna==3.19 \
--hash=sha256:5e0811a4383b21dc5838069f801c4fb62113b7447663d2530d2bd6e77b49bf15 \
--hash=sha256:815e7be7a7806d54abb586dc943addc79e8b2ee16915059658cbeff4b1b43bf4
Expand Down Expand Up @@ -347,7 +343,7 @@ snowballstemmer==3.1.1 \
sphinx==9.1.0 \
--hash=sha256:7741722357dd75f8190766926071fed3bdc211c74dd2d7d4df5404da95930ddb \
--hash=sha256:c84fdd4e782504495fe4f2c0b3413d6c2bf388589bb352d439b2a3bb99991978
# via build_file_generation (pyproject.toml)
# via build-file-generation (pyproject.toml)
sphinxcontrib-applehelp==2.0.0 \
--hash=sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1 \
--hash=sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5
Expand All @@ -372,7 +368,7 @@ sphinxcontrib-serializinghtml==2.0.0 \
--hash=sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331 \
--hash=sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d
# via
# build_file_generation (pyproject.toml)
# build-file-generation (pyproject.toml)
# sphinx
urllib3==2.8.0 \
--hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \
Expand Down
8 changes: 8 additions & 0 deletions examples/multi_python_versions/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@ module(
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_python", version = "0.0.0")
local_path_override(
module_name = "rules_python",
path = "../..",
)

uv = use_extension(
"@rules_python//python/uv:uv.bzl",
"uv",
dev_dependency = True,
)
uv.configure(version = "0.13.5")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.defaults(
# The environment variable takes precedence if set.
Expand Down
8 changes: 8 additions & 0 deletions examples/multi_python_versions/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ python_register_multi_toolchains(
register_coverage_tool = True,
)

load("@rules_python//python/uv:repositories.bzl", "uv_toolchains_manifest")

uv_toolchains_manifest(name = "uv_manifest")

load("@uv_manifest//:dist_manifest.bzl", "uv_register_toolchains")

uv_register_toolchains(name = "uv")

load("@python//:pip.bzl", "multi_pip_parse")

multi_pip_parse(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# This file was autogenerated by uv via the following command:
# bazel run //requirements:requirements_3_10.update
#
websockets==11.0.3 ; python_full_version >= "3.10.0" \
websockets==11.0.3 \
--hash=sha256:01f5567d9cf6f502d655151645d4e8b72b453413d3819d2b6f1185abc23e82dd \
--hash=sha256:03aae4edc0b1c68498f41a6772d80ac7c1e33c06c6ffa2ac1c27a07653e79d6f \
--hash=sha256:0ac56b661e60edd453585f4bd68eb6a29ae25b5184fd5ba51e97652580458998 \
Expand Down Expand Up @@ -75,4 +71,4 @@ websockets==11.0.3 ; python_full_version >= "3.10.0" \
--hash=sha256:f61bdb1df43dc9c131791fbc2355535f9024b9a04398d3bd0684fc16ab07df74 \
--hash=sha256:fb06eea71a00a7af0ae6aefbb932fb8a7df3cb390cc217d51a9ad7343de1b8d0 \
--hash=sha256:ffd7dcaf744f25f82190856bc26ed81721508fc5cbf2a330751e135ff1283564
# via multi_python_versions (requirements/pyproject.toml)
# via multi-python-versions (pyproject.toml)
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# This file was autogenerated by uv via the following command:
# bazel run //requirements:requirements_3_11.update
#
websockets==11.0.3 ; python_full_version >= "3.10.0" \
websockets==11.0.3 \
--hash=sha256:01f5567d9cf6f502d655151645d4e8b72b453413d3819d2b6f1185abc23e82dd \
--hash=sha256:03aae4edc0b1c68498f41a6772d80ac7c1e33c06c6ffa2ac1c27a07653e79d6f \
--hash=sha256:0ac56b661e60edd453585f4bd68eb6a29ae25b5184fd5ba51e97652580458998 \
Expand Down Expand Up @@ -75,4 +71,4 @@ websockets==11.0.3 ; python_full_version >= "3.10.0" \
--hash=sha256:f61bdb1df43dc9c131791fbc2355535f9024b9a04398d3bd0684fc16ab07df74 \
--hash=sha256:fb06eea71a00a7af0ae6aefbb932fb8a7df3cb390cc217d51a9ad7343de1b8d0 \
--hash=sha256:ffd7dcaf744f25f82190856bc26ed81721508fc5cbf2a330751e135ff1283564
# via multi_python_versions (requirements/pyproject.toml)
# via multi-python-versions (pyproject.toml)
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# This file was autogenerated by uv via the following command:
# bazel run //requirements:requirements_3_12.update
#
websockets==11.0.3 ; python_full_version >= "3.10.0" \
websockets==11.0.3 \
--hash=sha256:01f5567d9cf6f502d655151645d4e8b72b453413d3819d2b6f1185abc23e82dd \
--hash=sha256:03aae4edc0b1c68498f41a6772d80ac7c1e33c06c6ffa2ac1c27a07653e79d6f \
--hash=sha256:0ac56b661e60edd453585f4bd68eb6a29ae25b5184fd5ba51e97652580458998 \
Expand Down Expand Up @@ -75,4 +71,4 @@ websockets==11.0.3 ; python_full_version >= "3.10.0" \
--hash=sha256:f61bdb1df43dc9c131791fbc2355535f9024b9a04398d3bd0684fc16ab07df74 \
--hash=sha256:fb06eea71a00a7af0ae6aefbb932fb8a7df3cb390cc217d51a9ad7343de1b8d0 \
--hash=sha256:ffd7dcaf744f25f82190856bc26ed81721508fc5cbf2a330751e135ff1283564
# via multi_python_versions (requirements/pyproject.toml)
# via multi-python-versions (pyproject.toml)
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.13
# by the following command:
#
# This file was autogenerated by uv via the following command:
# bazel run //requirements:requirements_3_13.update
#
websockets==11.0.3 ; python_full_version >= "3.10.0" \
websockets==11.0.3 \
--hash=sha256:01f5567d9cf6f502d655151645d4e8b72b453413d3819d2b6f1185abc23e82dd \
--hash=sha256:03aae4edc0b1c68498f41a6772d80ac7c1e33c06c6ffa2ac1c27a07653e79d6f \
--hash=sha256:0ac56b661e60edd453585f4bd68eb6a29ae25b5184fd5ba51e97652580458998 \
Expand Down Expand Up @@ -75,4 +71,4 @@ websockets==11.0.3 ; python_full_version >= "3.10.0" \
--hash=sha256:f61bdb1df43dc9c131791fbc2355535f9024b9a04398d3bd0684fc16ab07df74 \
--hash=sha256:fb06eea71a00a7af0ae6aefbb932fb8a7df3cb390cc217d51a9ad7343de1b8d0 \
--hash=sha256:ffd7dcaf744f25f82190856bc26ed81721508fc5cbf2a330751e135ff1283564
# via multi_python_versions (requirements/pyproject.toml)
# via multi-python-versions (pyproject.toml)
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#
# This file is autogenerated by pip-compile with Python 3.14
# by the following command:
#
# This file was autogenerated by uv via the following command:
# bazel run //requirements:requirements_3_14.update
#
websockets==11.0.3 ; python_full_version >= "3.10.0" \
websockets==11.0.3 \
--hash=sha256:01f5567d9cf6f502d655151645d4e8b72b453413d3819d2b6f1185abc23e82dd \
--hash=sha256:03aae4edc0b1c68498f41a6772d80ac7c1e33c06c6ffa2ac1c27a07653e79d6f \
--hash=sha256:0ac56b661e60edd453585f4bd68eb6a29ae25b5184fd5ba51e97652580458998 \
Expand Down Expand Up @@ -75,4 +71,4 @@ websockets==11.0.3 ; python_full_version >= "3.10.0" \
--hash=sha256:f61bdb1df43dc9c131791fbc2355535f9024b9a04398d3bd0684fc16ab07df74 \
--hash=sha256:fb06eea71a00a7af0ae6aefbb932fb8a7df3cb390cc217d51a9ad7343de1b8d0 \
--hash=sha256:ffd7dcaf744f25f82190856bc26ed81721508fc5cbf2a330751e135ff1283564
# via multi_python_versions (requirements/pyproject.toml)
# via multi-python-versions (pyproject.toml)
8 changes: 8 additions & 0 deletions examples/pip_parse/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
module(name = "rules_python_pip_parse_example")

bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_python", version = "0.0.0")
local_path_override(
module_name = "rules_python",
path = "../..",
)

uv = use_extension(
"@rules_python//python/uv:uv.bzl",
"uv",
dev_dependency = True,
)
uv.configure(version = "0.13.5")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
# We can specify the exact version.
Expand Down
8 changes: 8 additions & 0 deletions examples/pip_parse/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ python_register_toolchains(
python_version = "3.14.0",
)

load("@rules_python//python/uv:repositories.bzl", "uv_toolchains_manifest")

uv_toolchains_manifest(name = "uv_manifest")

load("@uv_manifest//:dist_manifest.bzl", "uv_register_toolchains")

uv_register_toolchains(name = "uv")

load("@rules_python//python:pip.bzl", "pip_parse")

pip_parse(
Expand Down
28 changes: 11 additions & 17 deletions examples/pip_parse/requirements_lock.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.14
# by the following command:
#
# This file was autogenerated by uv via the following command:
# bazel run //:requirements.update
#
alabaster==0.7.16 \
--hash=sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65 \
--hash=sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92
Expand Down Expand Up @@ -219,7 +215,7 @@ libclang==18.1.1 \
--hash=sha256:a1214966d08d73d971287fc3ead8dfaf82eb07fb197680d8b3859dbbbbf78250 \
--hash=sha256:c533091d8a3bbf7460a00cb6c1a71da93bffe148f172c7d03b1c31fbf8aa2a0b \
--hash=sha256:cf4a99b05376513717ab5d82a0db832c56ccea4fd61a69dbb7bccf2dfb207dbe
# via pip_parse (pyproject.toml)
# via pip-parse (pyproject.toml)
markupsafe==3.0.3 \
--hash=sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f \
--hash=sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a \
Expand Down Expand Up @@ -410,12 +406,16 @@ requests==2.34.2 \
--hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 \
--hash=sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed
# via
# pip_parse (pyproject.toml)
# pip-parse (pyproject.toml)
# sphinx
s3cmd==2.1.0 \
--hash=sha256:49cd23d516b17974b22b611a95ce4d93fe326feaa07320bd1d234fed68cbccfa \
--hash=sha256:966b0a494a916fc3b4324de38f089c86c70ee90e8e1cae6d59102103a4c0cc03
# via pip_parse (pyproject.toml)
# via pip-parse (pyproject.toml)
setuptools==84.2.1 \
--hash=sha256:3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc \
--hash=sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2
# via yamllint
six==1.17.0 \
--hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 \
--hash=sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81
Expand All @@ -427,7 +427,7 @@ snowballstemmer==3.1.1 \
sphinx==7.3.7 \
--hash=sha256:413f75440be4cacf328f580b4274ada4565fb2187d696a84970c23f77b64d8c3 \
--hash=sha256:a4a7db75ed37531c05002d56ed6948d4c42f473a36f46e1382b0bd76ca9627bc
# via pip_parse (pyproject.toml)
# via pip-parse (pyproject.toml)
sphinxcontrib-applehelp==2.0.0 \
--hash=sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1 \
--hash=sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5
Expand All @@ -452,7 +452,7 @@ sphinxcontrib-serializinghtml==2.0.0 \
--hash=sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331 \
--hash=sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d
# via
# pip_parse (pyproject.toml)
# pip-parse (pyproject.toml)
# sphinx
urllib3==2.8.0 \
--hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \
Expand All @@ -463,10 +463,4 @@ urllib3==2.8.0 \
yamllint==1.28.0 \
--hash=sha256:89bb5b5ac33b1ade059743cf227de73daa34d5e5a474b06a5e17fc16583b0cf2 \
--hash=sha256:9e3d8ddd16d0583214c5fdffe806c9344086721f107435f68bad990e5a88826b
# via pip_parse (pyproject.toml)

# The following packages are considered to be unsafe in a requirements file:
setuptools==84.2.1 \
--hash=sha256:3ff8b3b5492a0aa66960f4419365a86b84e013070d4313e4d4a6894f5d64d6bc \
--hash=sha256:ca140b45d5325a9478f880e351484f62fef15f336462e449ca0c03c873d589c2
# via yamllint
# via pip-parse (pyproject.toml)
Loading
Loading