mirror of https://github.com/cheat/cheat.git
Use entry_points instead of scripts in setup.py
This allows a fine-grained control of the dependencies, because it generates a wrapper script that calls the specifiend function (i.e., main inside cheat/app.py)
This commit is contained in:
parent
5caa8fed38
commit
4d57f529c9
|
@ -31,12 +31,13 @@ Options:
|
|||
"""
|
||||
|
||||
# require the dependencies
|
||||
from cheat import *
|
||||
from cheat.utils import *
|
||||
import sheet
|
||||
import sheets
|
||||
from utils import *
|
||||
from docopt import docopt
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main():
|
||||
# parse the command-line options
|
||||
options = docopt(__doc__, version='cheat 2.1.3')
|
||||
|
||||
|
@ -59,3 +60,6 @@ if __name__ == '__main__':
|
|||
# print the cheatsheet
|
||||
else:
|
||||
print(colorize(sheet.read(options['<cheatsheet>'])))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue