From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82658C3ABA9 for ; Wed, 30 Apr 2025 15:42:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A4D0110E2ED; Wed, 30 Apr 2025 15:42:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="CvQkXnD6"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6ECC310E2ED; Wed, 30 Apr 2025 15:42:04 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 4F94F6842A; Wed, 30 Apr 2025 15:41:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CBD8C4CEE7; Wed, 30 Apr 2025 15:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746027716; bh=wvXwtYYiGxiI48kMlFqI73B5EWv7xUXFBIxXkrTt+Bs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CvQkXnD6RRGzklG5EJL3MIu49bvDA2Vje5jq31Zjyv2Nscn6EYlldH9tuao2IjrML 30afHneVRi57pHYoNLnfpYjhkW+6iyni/VCnNmF0bLvzCKxoD7P7TxdnLzmx3ge3c1 7WJTUtpAsKUl9HOPPon78HV8gjsHURM10LYvOyhKXo6IVV8LT17RGpHUaWZpA2LcVw yJfadKUxfK8xiA+UbbkkA98320JxxNblIeSxw/HnCC3+0io8rJaIcRtdhr13ldlzZs 9FKO+0ClU3Z+u2qmzU1g2y5vXwOZ3MX0tDU7NtpV3vFmhkera/NMv7fAYSfL8SPUv8 7ZsdRDuSXAXIg== Date: Wed, 30 Apr 2025 17:41:47 +0200 From: Mauro Carvalho Chehab To: Nicolas Schier Cc: Jonathan Corbet , Linux Doc Mailing List , David Airlie , Jani Nikula , Joonas Lahtinen , Maarten Lankhorst , Masahiro Yamada , Maxime Ripard , Nathan Chancellor , Nicolas Schier , Rodrigo Vivi , Simona Vetter , Thomas Zimmermann , Tvrtko Ursulin , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Andy Shevchenko , Andy Shevchenko Subject: Re: [PATCH v4 3/4] scripts/kernel-doc.py: don't create *.pyc files Message-ID: <20250430174147.05b330a9@foz.lan> In-Reply-To: References: <158b962ed7cd104f7bbfe69f499ec1cc378864db.1745453655.git.mchehab+huawei@kernel.org> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Em Fri, 25 Apr 2025 20:46:41 +0200 Nicolas Schier escreveu: > On Thu, Apr 24, 2025 at 08:16:23AM +0800 Mauro Carvalho Chehab wrote: > > As reported by Andy, kernel-doc.py is creating a __pycache__ > > directory at build time. > > > > Disable creation of __pycache__ for the libraries used by > > kernel-doc.py, when excecuted via the build system or via > > scripts/find-unused-docs.sh. > > > > Reported-by: Andy Shevchenko > > Closes: https://lore.kernel.org/linux-doc/Z_zYXAJcTD-c3xTe@black.fi.intel.com/ > > Signed-off-by: Mauro Carvalho Chehab > > Tested-by: Andy Shevchenko > > --- > > drivers/gpu/drm/Makefile | 2 +- > > drivers/gpu/drm/i915/Makefile | 2 +- > > include/drm/Makefile | 2 +- > > scripts/Makefile.build | 2 +- > > scripts/find-unused-docs.sh | 2 +- > > 5 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile > > index ed54a546bbe2..d21d0cd2c752 100644 > > --- a/drivers/gpu/drm/Makefile > > +++ b/drivers/gpu/drm/Makefile > > @@ -236,7 +236,7 @@ always-$(CONFIG_DRM_HEADER_TEST) += \ > > quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@) > > cmd_hdrtest = \ > > $(CC) $(c_flags) -fsyntax-only -x c /dev/null -include $< -include $<; \ > > - $(srctree)/scripts/kernel-doc -none $(if $(CONFIG_WERROR)$(CONFIG_DRM_WERROR),-Werror) $<; \ > > + PYTHONDONTWRITEBYTECODE=1 $(KERNELDOC) -none $(if $(CONFIG_WERROR)$(CONFIG_DRM_WERROR),-Werror) $<; \ > > Did someone check if we could add > > sys.dont_write_bytecode = True > > to the script itself instead of cluttering PYTHONDONTWRITEBYTECODE > everywhere [1]? Nice to know that we can set it at the script level. Yet, this is is meant to be a temporary solution, as IMO the best is to set PYTHONCACHEPREFIX to match the directory on O=, when it is used. Thanks, Mauro