Verified Commit fd86bdc7 authored by Max Rees's avatar Max Rees
Browse files

Allow AV_CONFIG to override configuration directory

parent 7a1990b7
......@@ -31,7 +31,7 @@ all:
paths:
@printf 'CONF: SYSCONFDIR = "%s"\n' '$(SYSCONFDIR)'
@sed -i \
-e '/^SYSCONFDIR = /s@= .*@= Path("/$(SYSCONFDIR)")@' \
-e '/^_SYSCONFDIR = /s@= .*@= Path("/$(SYSCONFDIR)")@' \
apkvitrine/__init__.py
.PHONY: install
......
......@@ -3,13 +3,18 @@
# See LICENSE for more information.
import collections # defaultdict
import configparser # ConfigParser
import os # environ
from pathlib import Path
VERSION = "0.1"
BUILDERS = "@builders"
DEFAULT = "@default"
SYSCONFDIR = Path(__file__).parent.parent
_SYSCONFDIR = Path(__file__).parent.parent
SYSCONFDIR = Path(os.environ.get(
"AV_CONFIG",
_SYSCONFDIR,
)).resolve(strict=False)
def _config_map(s):
d = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment