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 vanity CLI entrypoint #77

Closed

Conversation

cthoyt
Copy link
Contributor

@cthoyt cthoyt commented Mar 4, 2020

Closes #76

  • The encapsulation of the if __name__ == '__main__' makes it possible to import the code that runs the CLI from anywhere
  • The move from kge.py inside the package makes it possible to run it after install with python -m kge.cli
  • The addition of __main__.py makes it possible to run the CLI from python -m kge since it's imported
  • The addition of the entry_points keyword in setup.py makes the installer add a CLI script called kge that automatically runs the main function in cli.py.

I'd be happy to answer any questions

@cthoyt
Copy link
Contributor Author

cthoyt commented Mar 4, 2020

Not sure why there's all the config files in the diff.. I'm not very skilled with Git so maybe this happened because there were some edits to the repo after I forked it

Nevermind, I reverted the offending commit (0fb1955) from @rufex2001. Not sure how it got in here.

@rgemulla
Copy link
Member

rgemulla commented Mar 4, 2020

Great, cherry-picked & thanks!

@rgemulla rgemulla closed this Mar 4, 2020
@cthoyt
Copy link
Contributor Author

cthoyt commented Mar 4, 2020

You’re very welcome! Happy embedding and greetings from Bonn :)

@cthoyt cthoyt deleted the add-vanity-cli branch March 4, 2020 14:16
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use entry_points to make vanity CLI script
3 participants