anki/python/BUILD.bazel
Damien Elmes cbc358ff0b add aliases to run vendored python and node from command line
You can then do './scripts/python -m venv /path/to/venv' to create
a virtual env based on the bundled Python, which can be handy if
you don't happen to have the appropriate version of Python installed
separately.
2021-10-18 19:50:41 +10:00

49 lines
794 B
Python

load("@rules_python//python:defs.bzl", "py_binary")
load("@py_deps//:requirements.bzl", "requirement")
load(":binary.bzl", "pip_binary")
# e.g. bazel run python
alias(
name = "python",
actual = "@python//:python",
)
# e.g. bazel run python:pip
pip_binary(name = "pip")
pip_binary(name = "black")
pip_binary(name = "isort")
pip_binary(name = "mypy")
pip_binary(
name = "dmypy",
pkg = "mypy",
)
pip_binary(name = "pylint")
pip_binary(
name = "protoc-gen-mypy",
pkg = "mypy-protobuf",
)
py_binary(
name = "update",
srcs = ["update.py"],
data = [
"requirements.in",
"requirements.txt",
],
tags = ["manual"],
deps = [
requirement("pip-tools"),
],
)
exports_files([
"requirements.txt",
"licenses.json",
])