diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2016-09-20 20:18:24 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2016-09-29 22:07:06 +0200 |
commit | dc3fd60715a5b17b9542ec888c6eaeb14c284e2b (patch) | |
tree | 18d9f17b8d582409f0db55ee32fc5efa674aaa2e /git-interface/config.py | |
parent | 1946486a67d6085318e00c753d341ab05d12904c (diff) |
Use setuptools to install Python modules
Instead of using relative imports, add support for installing the config
and db Python modules to a proper location using setuptools. Change all
git-interface scripts to access those modules from the search path.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'git-interface/config.py')
-rw-r--r-- | git-interface/config.py | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/git-interface/config.py b/git-interface/config.py deleted file mode 100644 index aac188b..0000000 --- a/git-interface/config.py +++ /dev/null @@ -1,31 +0,0 @@ -import configparser -import os - -_parser = None - - -def _get_parser(): - global _parser - - if not _parser: - _parser = configparser.RawConfigParser() - if 'AUR_CONFIG' in os.environ: - path = os.environ.get('AUR_CONFIG') - else: - relpath = "/../conf/config" - path = os.path.dirname(os.path.realpath(__file__)) + relpath - _parser.read(path) - - return _parser - - -def get(section, option): - return _get_parser().get(section, option) - - -def getboolean(section, option): - return _get_parser().getboolean(section, option) - - -def getint(section, option): - return _get_parser().getint(section, option) |