Closed malt3 closed 1 year ago
Yes, this should be possible. Note that there are likely cases where you need to a system python instance set up in your environment for the python scripts themselves to be runnable. https://github.com/bazelbuild/bazel/issues/8685 and https://bazel.build/reference/be/python#py_runtime.stub_shebang may be good starting points for reading more about this.
All this being said, this is almost certainly not related to rules_pkg. If you find evidence that is the case, feel free to reopen this ticket.
for me it wants python2
load("@rules_pkg//:pkg.bzl", "pkg_tar")
pkg_tar(
name = "jsonnet",
srcs = ["//:jsonnet"],
package_dir = "/usr/local/bin",
)
FWIW... that should beload("@rules_pkg//pkg:tar.bzl", "pkg_tar")
for the current release.
I'm trying to use this ruleset to bundle tar files. On systems without python installed, the use of rules_pkg fails:
I understand that this project requires python, however I was wondering how to handle cases where python3 is not preinstalled on the host executing
bazel build
. Can users provide a hermetic, pre-registered python toolchain as described in https://github.com/bazelbuild/rules_python?