bazel_rules_pex icon indicating copy to clipboard operation
bazel_rules_pex copied to clipboard

Add a way to specify script attribute for pex

Open mouadino opened this issue 8 years ago • 1 comments

Sadly entrypoint isn't enough since not all scripts are tracked inside python packages, e.g. ansible project have useful scripts like ansible-playbook inside a folder called bin[1] that is not a python package, hence we cannot use entrypoint for it.

[1] https://github.com/ansible/ansible/tree/devel/bin

mouadino avatar Dec 19 '17 15:12 mouadino

This is very similar to what the main attribute does, but cleaner. How would you feel about changing the behavior of main so that acts like your new script attribute instead of its current (hacky) behavior? The way it translates filenames into python module/package names has always been a source of trouble, and it probably should have been done this way with --script all along.

benley avatar Dec 19 '17 20:12 benley