Open JinEnMok opened 6 months ago
It could be a nice to have. Could you please provide us some examples of other libs?
It appears Magic Wormhole also uses setup.py
. If you do want to switch to pyproject.toml
, here's an example from frogmouth
Hello,
i can address it issue.
It require to migrate to project.toml and use setup as backend. With it method a CLI entry-point can be generate during the pip install.
The entry point should use argparse, on rule of art for keep the control code near that lib (argparse) Look like the exemple can be a good entry point starter.
The entry point should ne complet, well documented , for permit future TUI/GUI implementations.
i send a PR soon
Adressed
The entry point is style empty but ready to implement the exemple docs/exemples/index.py
I 'll start by implementing the exemple and certainly STDIN / STDOUT as file
Have you a idea about how the entry point CLI should implement ?
image-go-nord image.jpg ./
image-go-nord -y image.jpg ./image-nord.jpg
cat ./image.jpg | image-go-nord -f > ./image-nord.jpg
etc ...
???
Modern Python build systems support at least some sort of
script
variable to define the method to be called when the package is supposed to be a CLI script, e.g. forsetup.py
this seems to be eitherscripts
orconsole_scripts
(see here for an example).Would it be possible to add something like that to ImageGoNord? I'm asking because I use
pipx
to install and maintain my Python CLI tools, and it refused to install ImageGoNord due to lack of such CLI entry point. This improvement would increase the package's reach and make it a bit more convention-conformant.