From patchwork Wed Apr 16 06:57:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 14053916 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 B5100C369C2 for ; Wed, 16 Apr 2025 13:15:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C1D1210E8F9; Wed, 16 Apr 2025 13:15:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="s15bmqiw"; 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 2D9F910E847; Wed, 16 Apr 2025 06:58:16 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id BB6DD6156A; Wed, 16 Apr 2025 06:57:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0AABC4CEED; Wed, 16 Apr 2025 06:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744786694; bh=jpugi8e27Z/kdIEtebaij6yO6Fpa6Eww1j0SfpkAUFA=; h=From:To:Cc:Subject:Date:From; b=s15bmqiwV28PXAkmAdxRYYpOba7jNZNHomcWboPJgJ47Ay0PZHKlY2+BmRa0sidKz ri9fduJ8afASG5nenH++l2F49AWz5I1yQ5HJswxpDIF5zvXiq/ASMvxgPibJ8O23qa SlDoK6gqU2cXIMMB6Ghmm2U8gT4M7bnF4872kLNN541tpwPXHS7skFkI/vuPjPjNDq 3ynPezXKX6eYFXQm252rE6UWUpGmr7hvUcBO4QLS64b0VVaZ8pjFWtJdqdvjS8MQrc Vv4zwFX2rdMaK1Er6QUvq93G3xT30xop33JlM8VkvLhIsmHG71FlBzSKAY5k9w5aMB oJLGpCKDmECYg== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1u4wiN-00000002kO3-3smf; Wed, 16 Apr 2025 14:57:43 +0800 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , Jonathan Corbet Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, Andy Shevchenko , David Airlie , Jani Nikula , Joonas Lahtinen , Maarten Lankhorst , Maxime Ripard , Rodrigo Vivi , Simona Vetter , Thomas Zimmermann , Tvrtko Ursulin , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Subject: [PATCH v2 0/2] Don't create Python bytecode when building the kernel Date: Wed, 16 Apr 2025 14:57:37 +0800 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 16 Apr 2025 13:15:46 +0000 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" As reported by Andy, the Kernel build system runs kernel-doc script for DRM, when W=1. Due to Python's normal behavior, its JIT compiler will create a bytecode and store it under scripts/lib/*/__pycache__. As one may be using O= and even having the sources on a read-only mount point, disable its creation during build time. This only solves half of the issue though, as one may be manually running the script by hand, without asking Python to not store any bytecode. This should be OK, but afterwards, git status will list the __pycache__ as not committed. To prevent that, add *.pyc to .gitignore. Mauro Carvalho Chehab (2): scripts/kernel-doc.py: don't create *.pyc files .gitignore: ignore Python compiled bytecode .gitignore | 1 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/i915/Makefile | 2 +- include/drm/Makefile | 2 +- scripts/find-unused-docs.sh | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-)