From 5ce4f143faa62d42ea19e3012c9613d752c993c9 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Mon, 5 Dec 2016 23:36:20 +0200 Subject: [PATCH] %(here)s should be the directory of the config file --- builders/builder.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/builders/builder.py b/builders/builder.py index 52b3b6d..c19766e 100644 --- a/builders/builder.py +++ b/builders/builder.py @@ -117,7 +117,7 @@ class Builder(object): """ Build some default values for the config file """ - return {'here': self.script_path} + return {'here': os.path.dirname(self.config_path)} def get_sphinx_build(self): """ @@ -167,14 +167,15 @@ class Builder(object): Read the configuration from the configuration file. """ self.config = ConfigParser(defaults=self.get_config_defaults()) - self.config.read(os.path.abspath(self.args.config)) + self.config.read(self.config_path) def setup_system_paths(self): """ Set up some system paths. """ - self.script_path = os.path.dirname(os.path.abspath(__file__)) self.python = sys.executable + self.script_path = os.path.dirname(os.path.abspath(__file__)) + self.config_path = os.path.abspath(self.args.config) def setup_executables(self): """