diff --git a/ctabus/internal/config.py b/ctabus/internal/config.py index 4cf9455..d3bea85 100644 --- a/ctabus/internal/config.py +++ b/ctabus/internal/config.py @@ -4,6 +4,7 @@ import appdirs app_dirs = appdirs.AppDirs('ctabus') config_dir = app_dirs.user_config_dir +cache_path = app_dirs.user_cache_dir try: with open(os.path.join(config_dir, 'api.txt')) as file: API_KEY = file.read().rstrip() diff --git a/ctabus/internal/disk_cache.py b/ctabus/internal/disk_cache.py index acd7529..10b1c2c 100644 --- a/ctabus/internal/disk_cache.py +++ b/ctabus/internal/disk_cache.py @@ -1,7 +1,7 @@ import pickle import os import lzma -from ctabus.config import cache_path +from ctabus.internal.config import cache_path if not os.path.exists(cache_path): os.mkdir(cache_path) diff --git a/requirements.txt b/requirements.txt index 0c78596..e57594b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ edlib python-dateutil terminaltables +appdirs diff --git a/setup.py b/setup.py index a658514..4acf4c0 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup with open('requirements.txt') as file: - INSTALL_REQUIRES = file.rstrip().split('\n') + INSTALL_REQUIRES = file.read().rstrip().split('\n') setup( name='ctabus',