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 Au0FM0H6jl9PfgAA0tVLHw (envelope-from ) for ; Tue, 20 Oct 2020 14:54:57 +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 aKFoLkH6jl/jWAAAbx9fmQ (envelope-from ) for ; Tue, 20 Oct 2020 14:54:57 +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 EACA69408E2 for ; Tue, 20 Oct 2020 14:54:54 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 7926B20005; Tue, 20 Oct 2020 10:54:44 -0400 (EDT) Received: from wedjat.horus-it.com (wedjat.horus-it.com [95.217.42.50]) by mail.notmuchmail.org (Postfix) with ESMTPS id B0D951FFA8 for ; Tue, 20 Oct 2020 10:54:41 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by wedjat.horus-it.com (Postfix) with ESMTP id 6DFEEA6003F8 for ; Tue, 20 Oct 2020 16:54:38 +0200 (CEST) X-Virus-Scanned: at horus-it.com Received: from wedjat (wedjat.horus-it.com [IPv6:2a01:4f9:2a:2e8d::c0de]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by wedjat.horus-it.com (Postfix) with ESMTPS id 42BA1A60026E for ; Tue, 20 Oct 2020 16:54:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ml.seichter.de; s=k1; t=1603205678; bh=h/k2VIgdZM8vOi2OJeS9EqgQczbuJCOVktTmC/1jyw4=; h=From:To:Subject:In-Reply-To:References:Date:Message-ID: Content-Type; b=FOtI1HIY/U8l+QemlySRow97Vef/GTxOVfSi4nlDoo25MU57agG7wqXAHEeu0ivJJ 8wYfAnMkKKuj5QFNHVmGqe71TrNYm7+Bn2FguWMUfLhcjKe8FOeDB4gkW4yVQRN4YT 4KtOTyCEMAEvV84u/81oor6S0l6iscrRF5Shu3jMLwHzfx1+1swf39JLYH1ZOhJ0wt jq1ndWDswydtYz8iWxJVvyNrqFqgecZDC4u9xX7Mpu+uA/a4aNJ5Qxp4DFb0zeTCZy gVT42owA5VD3LzeHt65SVii9buff27zvUx7YWA4YWY9GK9ogUCapEtMwl6wnMauPbB zapzlu/4PDV4A== From: Ralph Seichter To: notmuch@notmuchmail.org Subject: Re: Dependencies should include "realpath" In-Reply-To: References: <87d01hewdd.fsf@wedjat.horus-it.com> <87sgadwvpt.fsf@tethera.net> <87o8l1r6u0.fsf@wedjat.horus-it.com> Mail-Followup-To: notmuch@notmuchmail.org Date: Tue, 20 Oct 2020 16:54:38 +0200 Message-ID: <874kmpaqxd.fsf@wedjat.horus-it.com> MIME-Version: 1.0 Message-ID-Hash: M4R4B7FE3KMJULEMX2KCK54PQICJIGPP X-Message-ID-Hash: M4R4B7FE3KMJULEMX2KCK54PQICJIGPP X-MailFrom: ralph@ml.seichter.de 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=ml.seichter.de header.s=k1 header.b=FOtI1HIY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=ml.seichter.de (policy=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: 1.63 X-TUID: LmhF5b8pD35z * Tomi Ollila: >> 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) Looks like "pwd -P" is part of the Open Group base spec for pwd, so it should be available on supported platforms. > 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?;) As they say, you have the right to your opinion. ;-) I don't think it is "fine" at all. While rsti_dir+'/'+file may work, depending on the platform used, os.path.join(rsti_dir, file) *will* work. Quoting Python's "os" description, first sentence: "This module provides a portable way of using operating system dependent functionality." I see no viable reason not to use "os". > I am even personally changing some os.path.join(...) commands to use > that concatenation instead, just to reduce complexity and line count > elsewhere... I am sorry to hear that. There is nothing complex about using os.path, and as far as I am concerned, correctness and ease of maintenance beats a reduced line count every single time. -Ralph