Skip to content

Instantly share code, notes, and snippets.

@NathanHowell
NathanHowell / BUILD
Last active April 12, 2024 21:53
Seal Python with a VirtualEnv toolchain
load("@rules_python//python:defs.bzl", "py_runtime", "py_runtime_pair")
load(":venv.bzl", "py_venv")
load(":wrapper.bzl", "py_wrapper")
py_venv(
name = "py3_venv",
# caching the venv interpreter doesn't work for two reasons:
#
# * there are no platform dependencies on this target: the cache will contain binaries for the wrong OS
# * there are no dependencies on the interpreter binary or standard library: the cache may contain stale versions