Created
June 1, 2017 16:28
-
-
Save MadeOfMagicAndWires/42d783f58f43a1581bc59fa0f9bcce51 to your computer and use it in GitHub Desktop.
Setuptools entry point example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
# EASY-INSTALL-ENTRY-SCRIPT: 'pomodorotasks==0.4','gui_scripts','pomodoro-taskd' | |
__requires__ = 'pomodorotasks==0.4' | |
import re | |
import sys | |
from pkg_resources import load_entry_point | |
if __name__ == '__main__': | |
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) | |
sys.exit( | |
load_entry_point('pomodorotasks==0.4', 'gui_scripts', 'pomodoro-taskd')() | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment