Hi, yesterday I've tested rules_pyenv and I'm impressed, good job! The only small thing Is that it is a lot harder to package py_birnary target using pkg_tar. Because by default it includes pyenv, which is not what I want. Maybe you have solutions for that? Here's
py_binary(
name = "py_cli_bin",
srcs = ["entrypoint.py"],
main = "entrypoint.py",
deps = [
":cli_lib",
":cli_lib_auth",
] + cli_requirements,
python_version = "PY3",
)
pkg_tar(
name = "py_cli_tar",
srcs = [
":py_cli_bin",
],
include_runfiles = True, # this would include all deps including pyenv
)
I ended up creating source file group and writing simpler version of python bootstrap script to workaround this. Do you know a simple way to include runfiles but exclude pyenv?
Update. The method above fails to include include non-python files from cli_requirements. The other thing I tried is bazel build --spawn_strategy=local //cli:/py_cli_tar. It did succeed building tar package, but failed in another target during container_image build.
Related issue: bazelbuild/rules_pkg#135
Hi, yesterday I've tested rules_pyenv and I'm impressed, good job! The only small thing Is that it is a lot harder to package py_birnary target using pkg_tar. Because by default it includes pyenv, which is not what I want. Maybe you have solutions for that? Here's
I ended up creating source file group and writing simpler version of python bootstrap script to workaround this. Do you know a simple way to include runfiles but exclude pyenv?
Update. The method above fails to include include non-python files from cli_requirements. The other thing I tried is
bazel build --spawn_strategy=local //cli:/py_cli_tar. It did succeed building tar package, but failed in another target during container_image build.Related issue: bazelbuild/rules_pkg#135