From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6KnvGR3Til8qGAAA0tVLHw (envelope-from ) for ; Sat, 17 Oct 2020 11:18:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WDrfFR3Til+BKAAAbx9fmQ (envelope-from ) for ; Sat, 17 Oct 2020 11:18:53 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 024F79402A9 for ; Sat, 17 Oct 2020 11:18:49 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A707820052; Sat, 17 Oct 2020 07:18:38 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id DC3971FFB6 for ; Sat, 17 Oct 2020 07:18:36 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id E67045FE30; Sat, 17 Oct 2020 07:18:34 -0400 (EDT) Received: (nullmailer pid 1638172 invoked by uid 1000); Sat, 17 Oct 2020 11:18:33 -0000 From: David Bremner To: Ralph Seichter , notmuch@notmuchmail.org Subject: Re: Dependencies should include "realpath" In-Reply-To: <87o8l1r6u0.fsf@wedjat.horus-it.com> References: <87d01hewdd.fsf@wedjat.horus-it.com> <87sgadwvpt.fsf@tethera.net> <87o8l1r6u0.fsf@wedjat.horus-it.com> Date: Sat, 17 Oct 2020 08:18:33 -0300 Message-ID: <87pn5hw16e.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: WPFHTBRFZ576J2M7OB3K4WXL4JS6NDBK X-Message-ID-Hash: WPFHTBRFZ576J2M7OB3K4WXL4JS6NDBK X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 0.53 X-TUID: T3sDiF+aYKR4 Ralph Seichter writes: > * 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') > > 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. Someone (TM) would have to check that this version did not break out-of-tree builds. Other than that it seems plausible. > 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. It's somewhat orthogonal to this discussion, but I don't object to a patch replacing the hardcoded '/' with the appropriate python path manipulation code. I think windows compatibility for notmuch has much bigger issues, but it doesn't hurt to clean up the code. Other than that, I'm not sure what an "overhaul" would involve. d