39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Copyright (C) 2012 Fabio Erculiani
|
|
|
|
Authors:
|
|
Fabio Erculiani
|
|
|
|
This program is free software; you can redistribute it and/or modify it under
|
|
the terms of the GNU General Public License as published by the Free Software
|
|
Foundation; version 3.
|
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
details.
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
|
this program; if not, write to the Free Software Foundation, Inc.,
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
"""
|
|
import os
|
|
import tempfile
|
|
|
|
ICON_PATH = os.getenv("RIGO_ICON_PATH", "/usr/share/rigo/icons")
|
|
_local_icon_path = "./data/icons"
|
|
if os.path.isdir(_local_icon_path):
|
|
ICON_PATH = _local_icon_path
|
|
|
|
DATA_DIR = os.getenv("RIGO_DATA_DIR", "/usr/share/rigo")
|
|
_local_data_dir = "./data"
|
|
if os.path.isdir(_local_data_dir):
|
|
DATA_DIR = _local_data_dir
|
|
|
|
|
|
_home_dir = os.getenv("HOME")
|
|
if _home_dir is None:
|
|
_home_dir = tempfile.mkdtemp(prefix="EntropyHomeDirectory")
|
|
CONF_DIR = os.path.join(_home_dir, ".entropy")
|