Remove extra files from py_binary DefaultInfo#467
Remove extra files from py_binary DefaultInfo#467keith wants to merge 3 commits intoaspect-build:mainfrom
Conversation
This mirrors rules_python to ensure that users can use `execpath` with a py_binary target. Fixes aspect-build#455
| 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
This will not affect containers, but i am afraid it might break PEX
rules_py/py/private/run.tmpl.sh
Lines 5 to 6 in d49da0f
Under pex, the shell generated by py_binary is not used at all, and we invoke the main.py directly with the given interpreter. It would be good to manually test https://github.com/aspect-build/rules_py/tree/main/examples/py_pex_binary and confirm it doesn't break.
There was a problem hiding this comment.
I tested it manually, and also added a commit here which does a simple genrule/assert_contains to automate that test.
This mirrors rules_python to ensure that users can use
execpathwith apy_binary target.
Fixes #455