Skip to content
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 an entry point for build system to properly install the script #28

Open
JinEnMok opened this issue Apr 26, 2024 · 4 comments
Open
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@JinEnMok
Copy link

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. for setup.py this seems to be either scripts or console_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.

@TheJoin95
Copy link
Member

It could be a nice to have. Could you please provide us some examples of other libs?

@JinEnMok
Copy link
Author

It appears Magic Wormhole also uses setup.py. If you do want to switch to pyproject.toml, here's an example from frogmouth

@TheJoin95 TheJoin95 added help wanted Extra attention is needed good first issue Good for newcomers labels May 23, 2024
@Hierosme
Copy link

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

@Hierosme
Copy link

Hierosme commented Sep 16, 2024

Adressed
#30

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 ...

???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants