-
-
Notifications
You must be signed in to change notification settings - Fork 631
Description
While helping a user, I was pointed to an older dtschema wheel: https://pypi-browser.org/package/dtschema/dtschema-2021.10-py3-none-any.whl
Instead of having formally declared entry_points, it has e.g. {name}.data/scripts/{script-name}
entries e.g. dtschema-2021.10.data/scripts/dt-doc-validate
. I'm guessing its some older way of packaging entry points?
These are #!python
shebang scripts, so obviously they're expecting an installer to rewrite them. They have custom startup logic.
Normally we point users to py_console_script_binary, however, using it in this case is tought because of the custom startup logic. Similarly, re-exporting the file directory doesn't help because of the shebang.
I think, ideally, we could detect these during the repo phase and have a rule that wraps or transforms them. All it really has to do is copy the content into a .py file, then stick that in a py_binary.
More short term, some docs or helper rule for how to get these to be executable and runnable.