diff --git a/dev/BUILD.bazel b/dev/BUILD.bazel index 4ea3287c38..28163dacf6 100644 --- a/dev/BUILD.bazel +++ b/dev/BUILD.bazel @@ -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", ], diff --git a/examples/build_file_generation/WORKSPACE b/examples/build_file_generation/WORKSPACE index de1755ced7..0b6a47b874 100644 --- a/examples/build_file_generation/WORKSPACE +++ b/examples/build_file_generation/WORKSPACE @@ -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. diff --git a/examples/build_file_generation/gazelle_python.yaml b/examples/build_file_generation/gazelle_python.yaml index 692e69ef2d..5055a343e2 100644 --- a/examples/build_file_generation/gazelle_python.yaml +++ b/examples/build_file_generation/gazelle_python.yaml @@ -35,4 +35,4 @@ manifest: werkzeug: werkzeug pip_repository: name: pip -integrity: 256024227c088d508adca72c8a0b148a9945b856ef1a70716fc43a643f9b324d +integrity: 058d2c136aba6659b5ee8f2faa346b29e1b8d96a2fc0b14e4a7c930ca1836019 diff --git a/examples/build_file_generation/requirements_lock.txt b/examples/build_file_generation/requirements_lock.txt index a13976d3c3..40c5a69198 100644 --- a/examples/build_file_generation/requirements_lock.txt +++ b/examples/build_file_generation/requirements_lock.txt @@ -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 @@ -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 @@ -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 @@ -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 \ diff --git a/examples/build_file_generation/requirements_windows.txt b/examples/build_file_generation/requirements_windows.txt index 6f4034f02f..5c627ed02a 100644 --- a/examples/build_file_generation/requirements_windows.txt +++ b/examples/build_file_generation/requirements_windows.txt @@ -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 @@ -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 @@ -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 @@ -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 \ diff --git a/examples/multi_python_versions/MODULE.bazel b/examples/multi_python_versions/MODULE.bazel index 82faaf8214..12f89b67d1 100644 --- a/examples/multi_python_versions/MODULE.bazel +++ b/examples/multi_python_versions/MODULE.bazel @@ -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. diff --git a/examples/multi_python_versions/WORKSPACE b/examples/multi_python_versions/WORKSPACE index 0b6b8a0cbf..5e22b6460b 100644 --- a/examples/multi_python_versions/WORKSPACE +++ b/examples/multi_python_versions/WORKSPACE @@ -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( diff --git a/examples/multi_python_versions/requirements/requirements_lock_3_10.txt b/examples/multi_python_versions/requirements/requirements_lock_3_10.txt index 1659446de8..ad08ce02ec 100644 --- a/examples/multi_python_versions/requirements/requirements_lock_3_10.txt +++ b/examples/multi_python_versions/requirements/requirements_lock_3_10.txt @@ -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 \ @@ -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) diff --git a/examples/multi_python_versions/requirements/requirements_lock_3_11.txt b/examples/multi_python_versions/requirements/requirements_lock_3_11.txt index 436cb4ed33..f6b1dd5c71 100644 --- a/examples/multi_python_versions/requirements/requirements_lock_3_11.txt +++ b/examples/multi_python_versions/requirements/requirements_lock_3_11.txt @@ -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 \ @@ -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) diff --git a/examples/multi_python_versions/requirements/requirements_lock_3_12.txt b/examples/multi_python_versions/requirements/requirements_lock_3_12.txt index 2f00e1ad2b..d5820b7a1f 100644 --- a/examples/multi_python_versions/requirements/requirements_lock_3_12.txt +++ b/examples/multi_python_versions/requirements/requirements_lock_3_12.txt @@ -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 \ @@ -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) diff --git a/examples/multi_python_versions/requirements/requirements_lock_3_13.txt b/examples/multi_python_versions/requirements/requirements_lock_3_13.txt index 7b1fd074f5..571339dd4d 100644 --- a/examples/multi_python_versions/requirements/requirements_lock_3_13.txt +++ b/examples/multi_python_versions/requirements/requirements_lock_3_13.txt @@ -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 \ @@ -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) diff --git a/examples/multi_python_versions/requirements/requirements_lock_3_14.txt b/examples/multi_python_versions/requirements/requirements_lock_3_14.txt index 6acd264422..ff3ebe986a 100644 --- a/examples/multi_python_versions/requirements/requirements_lock_3_14.txt +++ b/examples/multi_python_versions/requirements/requirements_lock_3_14.txt @@ -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 \ @@ -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) diff --git a/examples/pip_parse/MODULE.bazel b/examples/pip_parse/MODULE.bazel index 89cbc30683..a840625597 100644 --- a/examples/pip_parse/MODULE.bazel +++ b/examples/pip_parse/MODULE.bazel @@ -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. diff --git a/examples/pip_parse/WORKSPACE b/examples/pip_parse/WORKSPACE index 8a53ab3fd8..dcfb11c02c 100644 --- a/examples/pip_parse/WORKSPACE +++ b/examples/pip_parse/WORKSPACE @@ -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( diff --git a/examples/pip_parse/requirements_lock.txt b/examples/pip_parse/requirements_lock.txt index b12c5f4feb..e73fd7f932 100644 --- a/examples/pip_parse/requirements_lock.txt +++ b/examples/pip_parse/requirements_lock.txt @@ -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 @@ -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 \ @@ -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 @@ -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 @@ -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 \ @@ -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) diff --git a/examples/pip_parse/requirements_windows.txt b/examples/pip_parse/requirements_windows.txt index ffba0abc41..e0c342573f 100644 --- a/examples/pip_parse/requirements_windows.txt +++ b/examples/pip_parse/requirements_windows.txt @@ -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==0.7.16 \ --hash=sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65 \ --hash=sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92 @@ -223,7 +219,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 \ @@ -414,12 +410,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 @@ -431,7 +431,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 @@ -456,7 +456,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 \ @@ -467,10 +467,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) diff --git a/examples/pip_parse_vendored/WORKSPACE b/examples/pip_parse_vendored/WORKSPACE index 0fd4364428..d65d5d610f 100644 --- a/examples/pip_parse_vendored/WORKSPACE +++ b/examples/pip_parse_vendored/WORKSPACE @@ -14,6 +14,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 repository isn't referenced, except by our test that asserts the requirements.bzl is updated. diff --git a/examples/pip_parse_vendored/requirements.txt b/examples/pip_parse_vendored/requirements.txt index 03f2c73b10..e4d00447ca 100644 --- a/examples/pip_parse_vendored/requirements.txt +++ b/examples/pip_parse_vendored/requirements.txt @@ -1,14 +1,10 @@ -# -# 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 -# certifi==2026.10.19 \ --hash=sha256:035c1e85572b141bf1c3a3eff0e33a8eb74917522f2559075ff8d2fea780a1ae \ --hash=sha256:42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b # via - # pip_parse_vendored (pyproject.toml) + # pip-parse-vendored (pyproject.toml) # requests charset-normalizer==3.5.1 \ --hash=sha256:00668ebb0609751758682eb0b5857e7c35b9f00e84dfdef062e103244ec94d45 \ @@ -191,7 +187,7 @@ idna==3.19 \ requests==2.34.2 \ --hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 \ --hash=sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed - # via pip_parse_vendored (pyproject.toml) + # via pip-parse-vendored (pyproject.toml) urllib3==2.8.0 \ --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \ --hash=sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63 diff --git a/examples/wheel/requirements_server.txt b/examples/wheel/requirements_server.txt index 3d89ffcf9e..b380f1fc96 100644 --- a/examples/wheel/requirements_server.txt +++ b/examples/wheel/requirements_server.txt @@ -1,26 +1,20 @@ -# -# 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 //examples/wheel:requirements_server.update -# -legacy-cgi==2.6.4 ; python_version >= "3.13" \ +legacy-cgi==2.6.4 \ --hash=sha256:7e235ce58bf1e25d1fc9b2d299015e4e2cd37305eccafec1e6bac3fc04b878cd \ --hash=sha256:abb9dfc7835772f7c9317977c63253fd22a7484b5c9bbcdca60a29dcce97c577 # via - # example_wheel (examples/wheel/pyproject.toml) + # example-wheel (pyproject.toml) # pypiserver packaging==26.1 \ --hash=sha256:5d9c0669c6285e491e0ced2eee587eaf67b670d94a19e94e3984a481aba6802f \ --hash=sha256:f042152b681c4bfac5cae2742a55e103d27ab2ec0f3d88037136b6bfe7c9c5de # via pypiserver -pypiserver==2.4.1 \ - --hash=sha256:156540f87ecfd6db06ae2c16e25ae5afe4fda6f510bd1c34e46fbb0c491bcd9e \ - --hash=sha256:45f116d0bff6aafcaed002cfad48a6832e62a82393e3a9b447d5c41a0e310fff - # via example_wheel (examples/wheel/pyproject.toml) - -# The following packages are considered to be unsafe in a requirements file: pip==26.2 \ --hash=sha256:2d8542afcc84cdd8e846c2b36b2861fad1da376dd98f8e7113e9108a3c331690 \ --hash=sha256:931c303696af6fa3417112103b1cad26890e5a07eccb5b99783700e33f2b8aad # via pypiserver +pypiserver==2.4.1 \ + --hash=sha256:156540f87ecfd6db06ae2c16e25ae5afe4fda6f510bd1c34e46fbb0c491bcd9e \ + --hash=sha256:45f116d0bff6aafcaed002cfad48a6832e62a82393e3a9b447d5c41a0e310fff + # via example-wheel (pyproject.toml) diff --git a/tests/multiple_inputs/BUILD.bazel b/tests/multiple_inputs/BUILD.bazel index 3e3cab83ca..d8ca164392 100644 --- a/tests/multiple_inputs/BUILD.bazel +++ b/tests/multiple_inputs/BUILD.bazel @@ -1,24 +1,47 @@ -load("@rules_python//python:pip.bzl", "compile_pip_requirements") +load("@bazel_skylib//rules:diff_test.bzl", "diff_test") +load("//python/uv:lock.bzl", "lock") -compile_pip_requirements( +lock( name = "multiple_requirements_in", srcs = [ "requirements_1.in", "requirements_2.in", ], - requirements_txt = "multiple_requirements_in.txt", + out = "multiple_requirements_in.txt", + # It seems that the CI remote executors for the RBE do not have network + # connectivity due to current CI setup. + tags = ["no-remote-exec"], + visibility = ["//:__subpackages__"], ) -compile_pip_requirements( +diff_test( + name = "multiple_requirements_in_test", + timeout = "short", + file1 = ":multiple_requirements_in", + file2 = "multiple_requirements_in.txt", +) + +lock( name = "multiple_pyproject_toml", srcs = [ "a/pyproject.toml", "b/pyproject.toml", ], - requirements_txt = "multiple_pyproject_toml.txt", + out = "multiple_pyproject_toml.txt", + # It seems that the CI remote executors for the RBE do not have network + # connectivity due to current CI setup. + tags = ["no-remote-exec"], + visibility = ["//:__subpackages__"], +) + +diff_test( + name = "multiple_pyproject_toml_test", + timeout = "short", + file1 = ":multiple_pyproject_toml", + file2 = "multiple_pyproject_toml.txt", ) -compile_pip_requirements( +lock( name = "multiple_inputs", srcs = [ "a/pyproject.toml", @@ -26,5 +49,16 @@ compile_pip_requirements( "requirements_1.in", "requirements_2.in", ], - requirements_txt = "multiple_inputs.txt", + out = "multiple_inputs.txt", + # It seems that the CI remote executors for the RBE do not have network + # connectivity due to current CI setup. + tags = ["no-remote-exec"], + visibility = ["//:__subpackages__"], +) + +diff_test( + name = "multiple_inputs_test", + timeout = "short", + file1 = ":multiple_inputs", + file2 = "multiple_inputs.txt", ) diff --git a/tests/multiple_inputs/README.md b/tests/multiple_inputs/README.md index 7b6bade122..2ab63fa13c 100644 --- a/tests/multiple_inputs/README.md +++ b/tests/multiple_inputs/README.md @@ -1,3 +1,3 @@ # multiple_inputs -Test that `compile_pip_requirements` works as intended when using more than one input file. +Test that `lock` works as intended when using more than one input file. diff --git a/tests/multiple_inputs/multiple_inputs.txt b/tests/multiple_inputs/multiple_inputs.txt index ad4474a4fc..602dc8ad0a 100644 --- a/tests/multiple_inputs/multiple_inputs.txt +++ b/tests/multiple_inputs/multiple_inputs.txt @@ -1,18 +1,14 @@ -# -# 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 //tests/multiple_inputs:multiple_inputs.update -# attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ --hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015 # via - # -r tests/multiple_inputs/requirements_2.in - # multiple_inputs_2 (tests/multiple_inputs/b/pyproject.toml) + # -r requirements_2.in + # multiple-inputs-2 (b/pyproject.toml) urllib3==2.8.0 \ --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \ --hash=sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63 # via - # -r tests/multiple_inputs/requirements_1.in - # multiple_inputs_1 (tests/multiple_inputs/a/pyproject.toml) + # -r requirements_1.in + # multiple-inputs-1 (a/pyproject.toml) diff --git a/tests/multiple_inputs/multiple_pyproject_toml.txt b/tests/multiple_inputs/multiple_pyproject_toml.txt index e6fdfb8ddc..f6326123da 100644 --- a/tests/multiple_inputs/multiple_pyproject_toml.txt +++ b/tests/multiple_inputs/multiple_pyproject_toml.txt @@ -1,14 +1,10 @@ -# -# 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 //tests/multiple_inputs:multiple_pyproject_toml.update -# attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ --hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015 - # via multiple_inputs_2 (tests/multiple_inputs/b/pyproject.toml) + # via multiple-inputs-2 (b/pyproject.toml) urllib3==2.8.0 \ --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \ --hash=sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63 - # via multiple_inputs_1 (tests/multiple_inputs/a/pyproject.toml) + # via multiple-inputs-1 (a/pyproject.toml) diff --git a/tests/multiple_inputs/multiple_requirements_in.txt b/tests/multiple_inputs/multiple_requirements_in.txt index 2711de925f..567df9e161 100644 --- a/tests/multiple_inputs/multiple_requirements_in.txt +++ b/tests/multiple_inputs/multiple_requirements_in.txt @@ -1,14 +1,10 @@ -# -# 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 //tests/multiple_inputs:multiple_requirements_in.update -# attrs==23.1.0 \ --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ --hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015 - # via -r tests/multiple_inputs/requirements_2.in + # via -r requirements_2.in urllib3==2.8.0 \ --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 \ --hash=sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63 - # via -r tests/multiple_inputs/requirements_1.in + # via -r requirements_1.in