-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re-organize py venv and use a bazel toolchain rule to specifiy expect…
…ed py path
- Loading branch information
Showing
7 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
.direnv | ||
.venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Envrionment setup for local developmeent using direnv. | ||
|
||
source secrets.rc | ||
|
||
# https://github.com/direnv/direnv/wiki/Python | ||
export VIRTUAL_ENV=.venv | ||
layout python-venv python3.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
load("@rules_python//python:defs.bzl", "py_runtime", "py_runtime_pair") | ||
|
||
py_runtime( | ||
name = "python-3.8", | ||
interpreter = ".venv/bin/python3.8", | ||
python_version = "PY3", | ||
) | ||
|
||
py_runtime_pair( | ||
name = "py_runtime_pair", | ||
py3_runtime = ":python-3.8", | ||
) | ||
|
||
toolchain( | ||
name = "py_toolchain", | ||
toolchain = ":py_runtime_pair", | ||
toolchain_type = "@rules_python//python:toolchain_type", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,5 @@ py_binary( | |
"//xlab/util/status:errors", | ||
requirement("absl-py"), | ||
requirement("protobuf"), | ||
], | ||
) |