Compare commits

..

8 Commits

Author SHA1 Message Date
Chris Lane
3b2848668a patch version bump. 2015-10-15 18:40:18 -04:00
Chris Lane
a8f91d4224 Minor tweaks. 2015-10-15 18:37:02 -04:00
Chris Lane
e0adbbc5b9 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.
2015-10-15 18:33:02 -04:00
Alessio Bogon
4d57f529c9 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)
2015-01-09 00:36:49 +01:00
Alessio Bogon
5caa8fed38 Improve setup.py description 2015-01-09 00:22:57 +01:00
Alessio Bogon
69f91e0cf4 Exploit setuptools package_data to include cheats 2015-01-09 00:08:38 +01:00
Alessio Bogon
fdbc8909cc Use find_packages from setuptools to identify packages 2015-01-08 23:58:35 +01:00
Alessio Bogon
76a91ce358 Use setuptools insted of distutils.
Distutils is old and basic, setuptools is the current preferred way.
See https://python-packaging-user-guide.readthedocs.org/en/latest/current.html
2015-01-08 23:54:12 +01:00
2 changed files with 34 additions and 24 deletions

View File

@@ -31,14 +31,15 @@ Options:
""" """
# require the dependencies # require the dependencies
from cheat import * import sheet
from cheat.utils import * import sheets
from utils import *
from docopt import docopt from docopt import docopt
if __name__ == '__main__': def main():
# parse the command-line options # parse the command-line options
options = docopt(__doc__, version='cheat 2.1.16') options = docopt(__doc__, version='cheat 2.1.17')
# list directories # list directories
if options['--directories']: if options['--directories']:
@@ -59,3 +60,6 @@ if __name__ == '__main__':
# print the cheatsheet # print the cheatsheet
else: else:
print(colorize(sheet.read(options['<cheatsheet>']))) print(colorize(sheet.read(options['<cheatsheet>'])))
if __name__ == '__main__':
main()

View File

@@ -1,26 +1,32 @@
from distutils.core import setup """cheat
import os ~~~~~~~~
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( setup(
name = 'cheat', name = 'cheat',
version = '2.1.16', version = '2.1.17',
author = 'Chris Lane', author = 'Chris Lane',
author_email = 'chris@chris-allen-lane.com', author_email = 'chris@chris-allen-lane.com',
license = 'GPL3', license = 'GPL3',
description = 'cheat allows you to create and view interactive cheatsheets ' description = 'cheat allows you to create and view interactive cheatsheets on the command-line',
'on the command-line. It was designed to help remind *nix system ' long_description = __doc__,
'administrators of options for commands that they use frequently, but not ' url = 'https://github.com/chrisallenlane/cheat',
'frequently enough to remember.', packages = find_packages(),
url = 'https://github.com/chrisallenlane/cheat', package_data = {
packages = [ 'cheat.cheatsheets': ['*'],
'cheat', },
'cheat.cheatsheets', entry_points = {
'cheat.test', 'console_scripts': [
], 'cheat = cheat.app:main',
package_data = { ],
'cheat.cheatsheets': [f for f in os.listdir('cheat/cheatsheets') if '.' not in f]
}, },
scripts = ['bin/cheat'],
install_requires = [ install_requires = [
'docopt >= 0.6.1', 'docopt >= 0.6.1',
'pygments >= 1.6.0', 'pygments >= 1.6.0',