Change default location of cheatsheets

This commit is contained in:
Tomas Korbar 2018-05-12 17:19:16 +02:00 committed by Tomas Korbar
parent df86142b8e
commit c4c935a6a5
3 changed files with 10 additions and 10 deletions

View File

@ -1,4 +0,0 @@
import os
def sheets_dir():
return os.path.split(__file__)

View File

@ -53,7 +53,7 @@ def paths():
""" Assembles a list of directories containing cheatsheets """
sheet_paths = [
default_path(),
cheatsheets.sheets_dir()[0],
'/usr/share/cheat',
]
# merge the CHEATPATH paths into the sheet_paths

View File

@ -1,6 +1,11 @@
from distutils.core import setup
import glob
import os
cheat_files = []
for f in os.listdir('cheat/cheatsheets/'):
cheat_files.append(os.path.join('cheat/cheatsheets/',f))
setup(
name = 'cheat',
version = '2.3.1',
@ -14,15 +19,14 @@ setup(
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',
]
],
data_files = [
('/usr/share/cheat', cheat_files),
],
)