blob: dd80db47faac2c0d0ca429b61c8fcdbcd69e5819 [file] [log] [blame]
workspace(name = "pip_repository_annotations_example")
local_repository(
name = "rules_python",
path = "../..",
)
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
# This toolchain is explicitly 3.10 while `rules_python` is 3.9 to act as
# a regression test, ensuring 3.10 is functional
python_register_toolchains(
name = "python310",
python_version = "3.10",
)
load("@python310//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_install", "pip_parse")
# For a more thorough example of `pip_parse`. See `@rules_python//examples/pip_parse`
pip_parse(
name = "pip_parsed",
python_interpreter_target = interpreter,
requirements_lock = "//:requirements.txt",
)
load("@pip_parsed//:requirements.bzl", install_pip_parse_deps = "install_deps")
install_pip_parse_deps()
# For a more thorough example of `pip_install`. See `@rules_python//examples/pip_install`
pip_install(
name = "pip_installed",
python_interpreter_target = interpreter,
requirements = "//:requirements.txt",
)
load("@pip_installed//:requirements.bzl", install_pip_install_deps = "install_deps")
install_pip_install_deps()