Skip to content

Cannot use py_runtime with the output of a sh_binary #1612

@snakethatlovesstaticlibs

Description

🐞 bug report

Affected Rule

The issue is caused by the rule: py_runtime

Is this a regression?

No

Description

We're not able to use py_runtime with the output of a sh_binary. This is useful because we want to customize how python searches for dynamic libraries at runtime.

🔬 Minimal Reproduction

https://github.com/snakethatlovesstaticlibs/bazel-py-runtime-repro

🔥 Exception or Error


BUILD:11:11: in interpreter attribute of py_runtime rule //:python3_runtime: '//:wrapped_python' must produce a single file. Since this rule was created by the macro 'py_runtime', the error might have been caused by the macro implementation

🌍 Your Environment

Operating System:

  
  Linux 6.5.11-linuxkit #1 SMP PREEMPT Mon Dec  4 11:30:00 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux and
  Darwin 22.6.0 Darwin Kernel Version 22.6.0
  

Output of bazel version:

  
bazel 7.0.0
  

Rules_python version:

  
latest main / b6ba317b8227c6d182d5e41d2571a217ecdf11a9d3ebc2cdef3bc5503fca2e76
  

Anything else relevant?

Related to bazelbuild/bazel#4286

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions