From 20d52376f9b82d9cc193955961e45bc51a9ba166 Mon Sep 17 00:00:00 2001 From: Chris Lane Date: Thu, 15 Oct 2015 18:56:34 -0400 Subject: [PATCH] Undid packaging refactoring. --- cheat/app.py => bin/cheat | 12 ++++------ setup.py | 46 +++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 34 deletions(-) rename cheat/app.py => bin/cheat (91%) diff --git a/cheat/app.py b/bin/cheat similarity index 91% rename from cheat/app.py rename to bin/cheat index bd40dd8..e91f73c 100755 --- a/cheat/app.py +++ b/bin/cheat @@ -31,15 +31,14 @@ Options: """ # require the dependencies -import sheet -import sheets -from utils import * +from cheat import * +from cheat.utils import * from docopt import docopt -def main(): +if __name__ == '__main__': # parse the command-line options - options = docopt(__doc__, version='cheat 2.1.17') + options = docopt(__doc__, version='cheat 2.1.16') # list directories if options['--directories']: @@ -60,6 +59,3 @@ def main(): # print the cheatsheet else: print(colorize(sheet.read(options['']))) - -if __name__ == '__main__': - main() diff --git a/setup.py b/setup.py index 0cda828..6be7354 100644 --- a/setup.py +++ b/setup.py @@ -1,32 +1,26 @@ -"""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 +from distutils.core import setup +import os setup( - name = 'cheat', - version = '2.1.17', - 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', - long_description = __doc__, - url = 'https://github.com/chrisallenlane/cheat', - packages = find_packages(), - package_data = { - 'cheat.cheatsheets': ['*'], - }, - entry_points = { - 'console_scripts': [ - 'cheat = cheat.app:main', - ], + name = 'cheat', + version = '2.1.16', + 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.', + url = 'https://github.com/chrisallenlane/cheat', + packages = [ + 'cheat', + 'cheat.cheatsheets', + 'cheat.test', + ], + package_data = { + 'cheat.cheatsheets': [f for f in os.listdir('cheat/cheatsheets') if '.' not in f] }, + scripts = ['bin/cheat'], install_requires = [ 'docopt >= 0.6.1', 'pygments >= 1.6.0',