From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CCtaO5zfjV/wXQAA0tVLHw (envelope-from ) for ; Mon, 19 Oct 2020 18:49:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kJo5N5zfjV8CRAAA1q6Kng (envelope-from ) for ; Mon, 19 Oct 2020 18:49:00 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 8C3239402B0 for ; Mon, 19 Oct 2020 18:48:58 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E65741FFF6; Mon, 19 Oct 2020 14:48:44 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id CE0521FFED for ; Mon, 19 Oct 2020 14:48:40 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id E919E1B0039A for ; Mon, 19 Oct 2020 21:48:25 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1603133306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d/lwVqQ6ncQSlrZWN2bjoX6rj2QVBBKYJ2ckJrtzAvI=; b=DVCXsQwfjn3IAMFsQXC/juHu2rEPBKvVmN72zUAg4V27Ufqgeqs7/oSN2euFgD0LzuiTGy ZoQYaX2aMRYkric2c8ipuoRuaGTVrDa2ERbHJkYwyhiviZcz6u5RwqjD9FgwwBLAKkbmoH 2JbnvcG+om/RrKgLm67qavqUYPUCYc1orwvjTEo1qXZKoj10gM5jIEz8LidObwo+9C0ywl JlBejhc8LZLhPb4HeCf9wyGIOj55Wc4ZDEKmMZ/d2PDAuD0OXA4JCS78/toDEDKzgX4QAN EWURpsxqAILP3LwvV51vD+f5+usG2sDrbQ0HLdIbdWEEaePXhOAv0hNmuh51cw== From: Tomi Ollila To: 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> User-Agent: Notmuch/0.31+4~gea158b8 (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1603133306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d/lwVqQ6ncQSlrZWN2bjoX6rj2QVBBKYJ2ckJrtzAvI=; b=tmM/d0KBO+HmCEBsb/rp+1eJzewPavtiEBhcgsYNSyB1g+qQddnnhdm+UFZU1pMIUI51no bFo0iv6q50D6BESeavTF8TFtrbHfQEOOiu++BfvGL+c+xb12zi8SNymIEMu6ucN+oHMz32 zP32b/lPm0oIcxDZkyu7TUoeGiBcaf6I/xieVa68eN1YEPQ2m2IPvsz+XTNDPfwFBKHJQF /OXUxm+EwDWaJQmcV0X3R/O4bc8iAV+QA2NtDPn67eh6WFag9ZxSNQMvJn2vcuEr/SW6ZI VIMeGWHAkHpplcDx6fUXj+U67xQ/O5CjMr8vgC1TWB9w3vhOBY+WODzHHzBpfA== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1603133306; a=rsa-sha256; cv=none; b=N9R1u6ZnMGL37jbnkFpXea9kW1n1hQ+Rag7p4b0AbKGIVUMbuJTxYAZTsdXYrN/RX5yQvK 2etIMKVGjJKiZVx7k+rJxBvFMVT2bfCtcKy7oc6euihRKD8aQee0vyi7+Pf21t1tfkVSTw P6h+Ja+BNrgnFXepBDCnSCVzoW1PEZ38WmaWHds4v3IGEHgV185wcEBqey6XSffql9Fyyc Kim+CFoFllbhalBVGQV+d2BkncMEizoM2gMU/r+3Gs0r1QGGrSLe05Px1SQItv6taSfqaw V8xPOE/+9drnTm2/AwnOgU6YOQdoC/wx75zN/+m/xbcmq1WPQzDuXIpRFY6cQQ== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi Message-ID-Hash: BHFXPZZXEQDWYFCGKKA7CQDQZ4O2KA4D X-Message-ID-Hash: BHFXPZZXEQDWYFCGKKA7CQDQZ4O2KA4D X-MailFrom: tomi.ollila@iki.fi 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=fail (body hash did not verify) header.d=iki.fi header.s=lahtoruutu header.b=DVCXsQwf; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 3.53 X-TUID: F8zRgqzy/cXk 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