X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=doc%2Fconf.py;fp=doc%2Fconf.py;h=fdff2a2c8ac524bacb86bb346ad03dfc2f31d997;hb=0e03e2d45e36edb635229f356bf41f153c30a70f;hp=70987ac5cc88f7030bb47548a768f807e0a491fb;hpb=78e9b3467d9f09228a444bb2eec93e4c765b7e9b;p=notmuch diff --git a/doc/conf.py b/doc/conf.py index 70987ac5..fdff2a2c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -22,6 +22,13 @@ for pathdir in ['.', '..']: with open(version_file,'r') as infile: version=infile.read().replace('\n','') +# read generated config +for pathdir in ['.', '..']: + conf_file = os.path.join(location,pathdir,'sphinx.config') + if os.path.exists(conf_file): + with open(conf_file,'r') as infile: + exec(''.join(infile.readlines())) + # The full version, including alpha/beta/rc tags. release = version @@ -29,12 +36,10 @@ release = version # directories to ignore when looking for source files. exclude_patterns = ['_build'] -if os.environ.get('WITH_EMACS') == '1': +if tags.has('WITH_EMACS'): # Hacky reimplementation of include to workaround limitations of # sphinx-doc lines = ['.. include:: /../emacs/rstdoc.rsti\n\n'] # in the source tree - rsti_dir = os.environ.get('RSTI_DIR') - # the other files are from the build tree for file in ('notmuch.rsti', 'notmuch-lib.rsti', 'notmuch-show.rsti', 'notmuch-tag.rsti'): lines.extend(open(rsti_dir+'/'+file)) rst_epilog = ''.join(lines)