-
-
Notifications
You must be signed in to change notification settings - Fork 678
py_wheel fails to correctly set file permissions #1711
Copy link
Copy link
Closed
Labels
Description
🐞 bug report
Affected Rule
py_wheel
Is this a regression?
This is a regression introduced after #1453
Description
Any executable files added to py_wheel targets lose their executable bit when they're installed via python (notably not when you manually unzip it)
🔬 Minimal Reproduction
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@rules_python//python:packaging.bzl", "py_wheel")
write_file(
name = "executable",
out = "executable.sh",
content = [
"#!/bin/bash",
"echo hello",
],
is_executable = True,
)
py_wheel(
name = "broken_permissions",
distribution = "broken_permissions",
python_tag = "py3",
version = "0.0.1",
deps = [
"executable",
],
)If you build the broken_permissions wheel and install it in a venv you'll find that executable.sh is not executable.
🌍 Your Environment
Operating System:
Linux
MacOS
Output of bazel version:
Bazelisk version: development
Build label: 7.0.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Dec 11 16:52:42 2023 (1702313562)
Build timestamp: 1702313562
Build timestamp as int: 1702313562
Rules_python version:
0.28.0
Anything else relevant?
Reactions are currently unavailable