From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Subject: Re: Dependencies should include "realpath"
Date: Mon, 19 Oct 2020 21:48:22 +0300 [thread overview]
Message-ID: <m2362a1289.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87o8l1r6u0.fsf@wedjat.horus-it.com>
On Sat, Oct 17 2020, Ralph Seichter wrote:
> * David Bremner:
>
>> Do you have a suggested replacement? I guess some inline perl with "use
>> Cwd 'realpath'" would probably work, although I haven't tested it.
>
> At a quick glance, that particular section of "configure" is run by
> doc/conf.py to generate three lines of Python code and store the result
> as sphinx.config, correct? If so, my preferred choice would be to use
> Python to figure out the absolute path, e.g. like so:
>
> rsti_dir = os.path.abspath('emacs')
Good suggestion, anyway, the simplest change would be just:
- printf "rsti_dir = '%s'\n" $(realpath emacs)
+ printf "rsti_dir = '%s'\n" $(cd emacs && pwd -P)
> This shows the generated result, and I assume that emacs is a directory
> in the source tree? I also wonder if an absolute directory path is really
> required for the doc-build to work.
Absolute path is safer when doing out-of-tree builds
> The segment of conf.py which uses the generated config file does not
> look convincing to me anyway. Apparently the original author did not
> like it either, which is why the segment is labelled as "hacky". It
> should probably be overhauled, and not only because it uses the
> statement open(rsti_dir+'/'+file) which will potentially fail, depending
> on the build platform.
Sure, the doc/conf.py is somewhat hacky, but has done the work for couple
of years already :D (not that anyone who would like to make is better would
not be welcome to do so). Then, just for the record, I think
open(rsti_dir+'/'+file) is fine, and I don't see it failing on any
imaginable system notmuch work (now?;) -- I am even personally changing
some os.path.join(...) commands to use that concatenation instead, just
to reduce complexity and line count elsewhere...
Tomi
>
> -Ralph
next prev parent reply other threads:[~2020-10-19 18:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 20:42 Dependencies should include "realpath" Ralph Seichter
2020-10-17 0:18 ` David Bremner
2020-10-17 1:15 ` Ralph Seichter
2020-10-17 11:18 ` David Bremner
2020-10-17 23:08 ` Ralph Seichter
2020-10-19 18:48 ` Tomi Ollila [this message]
2020-10-20 14:54 ` Ralph Seichter
2020-10-20 15:06 ` Tomi Ollila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2362a1289.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).