From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id CCB693858D33 for ; Thu, 10 Nov 2022 05:27:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCB693858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 137C5211C1; Thu, 10 Nov 2022 05:27:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1668058020; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CX20WovnTNGasdqm0nv0h1xnYTui5AMZd2qsLT9fVck=; b=q5iFSEoNg3d8CRKEHjD+21a1N1q7WRPENhAFgTHzObxmlKa3M9ybl00rz/vjAg8BKms9/N wsIY/mfGfm6NW3GTMZ4s7NUrcL47qOTxYLGUbDKCqbAkplKl3LZIs/aQjxezAkly10XGeg 0DLMseTUHO69a8yC08VFKcXTtijrA7E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1668058020; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CX20WovnTNGasdqm0nv0h1xnYTui5AMZd2qsLT9fVck=; b=PvnSw1qdaQID9tIp0xmwep0QfDRYwApFWJiODft8ZqPPF3uvYEJczwrNCYqcREvZI5ILm3 mPzdFz//FGLE8ZBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D5C9413479; Thu, 10 Nov 2022 05:26:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id vI8FM6OLbGMlZQAAMHmgww (envelope-from ); Thu, 10 Nov 2022 05:26:59 +0000 Message-ID: <2b567dfa-7ea9-38b7-9540-68bf58e89629@suse.cz> Date: Thu, 10 Nov 2022 06:26:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] doc: Use a separate directory for new modules we add to PATH To: =?UTF-8?Q?Arsen_Arsenovi=c4=87?= , gcc-patches@gcc.gnu.org References: <20221109213132.2698221-1-arsen@aarsen.me> Content-Language: en-US From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <20221109213132.2698221-1-arsen@aarsen.me> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/9/22 22:31, Arsen Arsenović wrote: > ChangeLog: > > * doc/baseconf.py: Inject dirname(__file__)/'modules' to path > instead of just ``.''. > * doc/gcc_sphinx.py: Moved to... > * doc/modules/gcc_sphinx.py: ...here. > --- > Evening, > > This patch addresses a path mixup and provides a nice compromise between > convenience for the user and namespace cleanliness. Further modules > that Sphinx imports internally from the GCC tree should also go into > this directory. I moved gcc_sphinx since I knew of that one, but there > could be others I'm missing. Thank for the patch, I'm going to push it. Martin > > Tested on x86_64-pc-linux-gnu with ``make html''. > > Have a great night! > > doc/baseconf.py | 4 +++- > doc/{ => modules}/gcc_sphinx.py | 0 > 2 files changed, 3 insertions(+), 1 deletion(-) > rename doc/{ => modules}/gcc_sphinx.py (100%) > > diff --git a/doc/baseconf.py b/doc/baseconf.py > index 47e3a126416..d85659e4540 100644 > --- a/doc/baseconf.py > +++ b/doc/baseconf.py > @@ -13,7 +13,6 @@ > import os > import time > import sys > -# sys.path.insert(0, os.path.abspath('.')) > > # gccint needs a deeper stack limit > sys.setrecursionlimit(2000) > @@ -23,8 +22,11 @@ sys.setrecursionlimit(2000) > # The full version, including alpha/beta/rc tags > > folder = os.path.dirname(os.path.realpath(__file__)) > +doc_modules = os.path.join(folder, 'modules') > gcc_srcdir = os.path.join(folder, '..', 'gcc') > > +sys.path.insert(0, doc_modules) > + > def read_file(name): > path = os.path.join(gcc_srcdir, name) > if os.path.exists(path): > diff --git a/doc/gcc_sphinx.py b/doc/modules/gcc_sphinx.py > similarity index 100% > rename from doc/gcc_sphinx.py > rename to doc/modules/gcc_sphinx.py