Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra files from py_binary DefaultInfo #467

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions py/private/py_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ def _py_binary_rule_impl(ctx):

return [
DefaultInfo(
files = depset([
executable_launcher,
ctx.file.main,
site_packages_pth_file,
]),
files = depset([executable_launcher]),
executable = executable_launcher,
runfiles = runfiles,
),
Expand Down
2 changes: 0 additions & 2 deletions py/tests/py_image_layer/my_app_layers.listing
Original file line number Diff line number Diff line change
Expand Up @@ -2439,8 +2439,6 @@ drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/
drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/
drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_image_layer/
-rwxr-xr-x 0 0 0 2887 Jan 1 2023 ./py/tests/py_image_layer/my_app_bin
-rwxr-xr-x 0 0 0 16 Jan 1 2023 ./py/tests/py_image_layer/main.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks to me like this will break the ability to execute a container from this image - the entry point is gone. @thesayyn do you know if we have a test here that the py_image_layer can execute? Do we need to add a TestContainers Cloud or something so we have a docker daemon to run that assertion?

-rwxr-xr-x 0 0 0 40 Jan 1 2023 ./py/tests/py_image_layer/my_app_bin.venv.pth
drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_image_layer/my_app_bin.runfiles/
drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_image_layer/my_app_bin.runfiles/aspect_rules_py/
drwxr-xr-x 0 0 0 0 Jan 1 2023 ./py/tests/py_image_layer/my_app_bin.runfiles/aspect_rules_py/py/
Expand Down
Loading