blob: 9b0212e28d169aa6b30dbc23d313747ffef1cfe7 [file]
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.
python_version = "3.14.0",
)
# You can use this repo mapping to ensure that your BUILD.bazel files don't need
# to be updated when the python version changes to a different `3.14` version.
use_repo(
python,
python_3_14 = "python_3_14_0",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
download_only = True,
experimental_requirement_cycles = {
"sphinx": [
"sphinx",
"sphinxcontrib-serializinghtml",
"sphinxcontrib-qthelp",
"sphinxcontrib-htmlhelp",
"sphinxcontrib-devhelp",
"sphinxcontrib-applehelp",
],
},
hub_name = "pypi",
# We need to use the same version here as in the `python.toolchain` call.
python_version = "3.14.0",
uv_lock = "//:uv.lock",
)
use_repo(pip, "pypi")