From 34848dcda7de78e879d62d6c12ff38c80cee87cf Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Mon, 7 Nov 2016 15:27:01 +0100 Subject: [PATCH] Switch dependency from xdg to pyxdg Fixes #129 --- README.website.md | 2 +- util/automation.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.website.md b/README.website.md index f37ae299..e60ed9ba 100644 --- a/README.website.md +++ b/README.website.md @@ -21,7 +21,7 @@ The tracking of WER is made using the following workflow: * BeautifulSoup4 * GitPython * pysftp - * xdg + * pyxdg * requests * Construct cron job: ``` diff --git a/util/automation.py b/util/automation.py index 8787df75..f58c1b66 100644 --- a/util/automation.py +++ b/util/automation.py @@ -3,11 +3,11 @@ import os import git import requests import sys -import xdg import shutil import subprocess from glob import glob +from xdg import BaseDirectory GITHUB_API_BASE = 'https://api.github.com' MOZILLA_GITHUB_ACCOUNT = os.environ.get('ds_github_account', 'mozilla') @@ -16,11 +16,11 @@ DEEPSPEECH_GITHUB_REF = os.environ.get('ds_github_ref', 'refs/heads/wer-tra DEEPSPEECH_CLONE_PATH = os.path.abspath(os.environ.get('ds_clone_path', './ds_exec_clone/')) -CACHE_DIR = os.path.join(xdg.XDG_CACHE_HOME, 'deepspeech_wer') +CACHE_DIR = os.path.join(BaseDirectory.xdg_cache_home, 'deepspeech_wer') LOCKFILE = os.path.join(CACHE_DIR, 'lock') SHA1FILE = os.path.join(CACHE_DIR, 'last_sha1') -DATA_DIR = os.path.join(xdg.XDG_DATA_HOME, 'deepspeech_wer') +DATA_DIR = os.path.join(BaseDirectory.xdg_data_home, 'deepspeech_wer') CKPT_DIR = os.path.join(DATA_DIR, 'checkpoint') def try_get_lock():