Skip to content

use entry_points for setting up bin script #107

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

Merged
merged 1 commit into from
May 14, 2020
Merged

Conversation

MasterOdin
Copy link
Collaborator

Gets rid of the symlinked tldr that was getting installed as a script (to make doing tldr work) and use entry_points / console_scripts instead which is the proper way. This also means that someone cloning the repo on Windows will not have a useless file.

@zlatanvasovic zlatanvasovic merged commit 88924ed into master May 14, 2020
@zlatanvasovic zlatanvasovic deleted the console_scripts branch May 14, 2020 09:59
@MasterOdin
Copy link
Collaborator Author

For future reference to anyone interested, the entry_points was added back when this project started, but was then removed in da8c106 due to the cited reason of "Don't use entry points, they are too slow". The historical reference for this would be that back then, doing python3 setup.py install was a recommended way of doing things (and maybe also pip) which would wrap the script in a pkg_resources reference. Importing pkg_resources could add a lot of overhead on running a script (see pypa/setuptools#711 for discussion on it). However, since then, python3 setup.py install has become a deprecated way of installing things, preferring to do pip3 install ., which bypasses pkg_resources and keeps running the script snappy, without having to resort to workarounds.

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.

2 participants