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.
This commit is contained in:
parent
5e604df306
commit
cbc358ff0b
|
@ -2,6 +2,15 @@ load("@rules_python//python:defs.bzl", "py_binary")
|
||||||
load("@py_deps//:requirements.bzl", "requirement")
|
load("@py_deps//:requirements.bzl", "requirement")
|
||||||
load(":binary.bzl", "pip_binary")
|
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 = "black")
|
||||||
|
|
||||||
pip_binary(name = "isort")
|
pip_binary(name = "isort")
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
bazel run python -- $*
|
|
@ -29,3 +29,8 @@ alias(
|
||||||
name = "yarn",
|
name = "yarn",
|
||||||
actual = "@nodejs//:yarn",
|
actual = "@nodejs//:yarn",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
alias(
|
||||||
|
name = "node",
|
||||||
|
actual = "@nodejs//:node",
|
||||||
|
)
|
||||||
|
|
Loading…
Reference in New Issue