mirror of
https://github.com/cheat/cheat.git
synced 2024-11-23 22:41:35 +01:00
afcaaafbe5
Previously, `sheets.print()` would query the filesystem every time it was invoked. This was inelegant, because it is called multiple times every time `cheat` is executed. Thus, unnecessary calls were being made out to the filesystem. Now the result of that function is being buffered into a module variable when it is executed the first time, and served from there thereafter. I broke the "functional" paradigm to a degree by doing this, but it wasn't worth the complexity of implementing proper memoization (decorators, etc) for such a trivial case. Bumped the version number accordingly.
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
from distutils.core import setup
|
|
import os
|
|
|
|
data = [
|
|
('/usr/share/zsh/site-functions', ['cheat/autocompletion/_cheat.zsh']),
|
|
('/etc/bash_completion.d' , ['cheat/autocompletion/cheat.bash']),
|
|
('/usr/share/fish/completions' , ['cheat/autocompletion/cheat.fish'])
|
|
]
|
|
|
|
if os.name == 'nt':
|
|
data = []
|
|
|
|
setup(
|
|
name = 'cheat',
|
|
version = '2.0.4',
|
|
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'],
|
|
data_files = data,
|
|
install_requires = [
|
|
'docopt >= 0.6.1',
|
|
'pygments >= 1.6.0',
|
|
]
|
|
)
|