-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add a CLI to invoke entrypoint scripts #328
Comments
This would also simply entrypoint script generation as they could just use this instead. We are currently doing some very hacky things 😛 They could be replaced with the following. #!/bin/sh
exec /path/to/target/python -m importlib.invoke_script sphinx-build --distribution Sphinx (used a |
I can think of a couple of ways this could be implemented.
I wouldn't allow the invocation to take command-line parameters (e.g. Another concern to consider - scripts come in two flavors: "console" and "gui", with the latter launched under Another factor to consider: many projects have only one console_script entry point and it's obviated by the runpy script. In your example, one can use Related, some in Setuptools have suggestions on how runpy and console scripts could be unified. If that approach were taken, then the proposals above would be obviated and scripts could be generated from functionality also available via I do think it would be nice if a package could somehow (automatically) expose various commands that could be reached through a simple syntax and expose the same name as executables on PATH. All of this said, this project ( I'd be interested in contributing to a design and advising if someone would be willing to spearhead the effort. |
I'm closing this issue as there's nothing particularly pertinent to this project, but I encourage continued work on these ideas. |
There are a few use-cases where we may want to invoke entrypoint scripts without relying on them being on
PATH
. Scripts are not required to be installed and operate outside the Python environment, in some systems it's undesirable to install Python entrypoint scripts, and there are some edge cases, like the one highlighted in https://discuss.python.org/t/pep-517-definition-of-isolated-build-environments-breaks-sysconfig-contract/9583, where there may be issues on relying on them to be inPATH
. Other example would be environments such as what is proposed on PEP 582, where it's just not possible to update the value ofPATH
.I propose the adding a CLI to invoke entrypoint scripts:
This module name is fairly bit and not particularly nice, but I don't really have any better proposal. Please let me know if you have a better one 😅
The text was updated successfully, but these errors were encountered: