Re: Dependencies should include "realpath"

Subject: Re: Dependencies should include "realpath"

Date: Sun, 18 Oct 2020 01:08:49 +0200

To: notmuch@notmuchmail.org

Cc:

From: Ralph Seichter


* David Bremner:

> I'm not sure what an "overhaul" would involve.

Looking at conf.py, I find the following confusing:

  lines = ['.. include:: /../emacs/rstdoc.rsti\n\n'] # in the source 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)
  del lines

"lines" is of type List[str]. In a loop which uses "file" (a reserved
expression), open() returns file handles on success. The string (!) list
is then extended with file handles, and after the loop, members of the
list (one string, n file handles) are concatenated using an empty string.
What is the reasoning behind this code segment?

As for generating a config file with configure and then reading and
executing individual lines from Python: Why not write to doc/dyncf.py 
and use "from .dyncf import tags, rsti_dir" in conf.py?

Maybe I am off on a tangent, though. It would help me if I knew what
problem you were actually trying to solve?`

-Ralph
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: