mirror of https://github.com/cheat/cheat.git
Merge branch 'setup-improvements' of https://github.com/youtux/cheat into youtux-setup-improvements
* 'setup-improvements' of https://github.com/youtux/cheat: Use entry_points instead of scripts in setup.py Improve setup.py description Exploit setuptools package_data to include cheats Use find_packages from setuptools to identify packages Use setuptools insted of distutils.
This commit is contained in:
commit
e0adbbc5b9
|
@ -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.16')
|
||||
|
||||
|
@ -59,3 +60,6 @@ if __name__ == '__main__':
|
|||
# print the cheatsheet
|
||||
else:
|
||||
print(colorize(sheet.read(options['<cheatsheet>'])))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
33
setup.py
33
setup.py
|
@ -1,5 +1,14 @@
|
|||
from distutils.core import setup
|
||||
import os
|
||||
"""cheat
|
||||
~~~~~~~~
|
||||
|
||||
cheat allows you to create and view interactive cheatsheets on the
|
||||
command-line. It was designed to help remind *nix system administrators of
|
||||
options for commands that they use frequently, but not frequently enough
|
||||
to remember.
|
||||
:license: GPL3
|
||||
"""
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
setup(
|
||||
name = 'cheat',
|
||||
|
@ -7,20 +16,18 @@ setup(
|
|||
author = 'Chris Lane',
|
||||
author_email = 'chris@chris-allen-lane.com',
|
||||
license = 'GPL3',
|
||||
description = 'cheat allows you to create and view interactive cheatsheets '
|
||||
'on the command-line. It was designed to help remind *nix system '
|
||||
'administrators of options for commands that they use frequently, but not '
|
||||
'frequently enough to remember.',
|
||||
description = 'cheat allows you to create and view interactive cheatsheets on the command-line',
|
||||
long_description = __doc__,
|
||||
url = 'https://github.com/chrisallenlane/cheat',
|
||||
packages = [
|
||||
'cheat',
|
||||
'cheat.cheatsheets',
|
||||
'cheat.test',
|
||||
],
|
||||
packages = find_packages(),
|
||||
package_data = {
|
||||
'cheat.cheatsheets': [f for f in os.listdir('cheat/cheatsheets') if '.' not in f]
|
||||
'cheat.cheatsheets': ['*'],
|
||||
},
|
||||
entry_points = {
|
||||
'console_scripts': [
|
||||
'cheat = cheat.app:main',
|
||||
],
|
||||
},
|
||||
scripts = ['bin/cheat'],
|
||||
install_requires = [
|
||||
'docopt >= 0.6.1',
|
||||
'pygments >= 1.6.0',
|
||||
|
|
Loading…
Reference in New Issue