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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90B7AC433F5 for ; Tue, 30 Nov 2021 18:52:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1B42F82FDE; Tue, 30 Nov 2021 19:52:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="QvQjQpyR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B8ADF811D2; Tue, 30 Nov 2021 19:52:33 +0100 (CET) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 83FDB8306E for ; Tue, 30 Nov 2021 19:52:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82c.google.com with SMTP id m25so21186937qtq.13 for ; Tue, 30 Nov 2021 10:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=vPzIkfAgmaS6ZTw4mIMnXg0oSDWhLesPjdVQBpZ8/NI=; b=QvQjQpyRkdKW+/2fSI94yMSJEBeTPCnknj6i8uJsma1SmHptPx9YarGRjceHHRHC0H tBFIn48c2SprZqmLKZVS24Y5Ou0Wl2iz9nOMOYjB8zZvRZ+FHkn0982kdZDJXbeL2/Cu VBVx0E0q7Yl7zCAVo8MMEszwU8gW/AXm85sfQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vPzIkfAgmaS6ZTw4mIMnXg0oSDWhLesPjdVQBpZ8/NI=; b=AX+wOD28jzXAc+BwmJMCFn6DPWqaH0k8S9W31gAfCOP3jkUY0NHtS42cFbJYLYGnCb w38SwyNdS9iQchBBuI5AP5JAd4UordpZTy+epBNPtU3BT8CJqe3WprUPANH2wybm/FxE iFACpPByEXz7mWV/hvtb1jGN0IokQrJXpJwSRxL5JwgbvTiGn0VNvojsVkcF2ZG17hET XuzrnCdchMLyhfyTeSnIPg8lpRT8DvYythav9JJAK8+A2FRCpEV+Alg6tANW1cJ5vsy/ CASP8zgtpiVf1D6ic4yC22wsxtLsVlAPrMKr+zGDUBH0C2EGFGC3smpLZfiMYU+M+/Fq 2ksA== X-Gm-Message-State: AOAM533pcCSVIMNsrrheB8DOgDq4sIZvVDURGfrp/jAJshYLusygnkvY x5NX689EI+jFAbgRT405vFkWFUL85FH0tg== X-Google-Smtp-Source: ABdhPJw27iFpKbesPxqTwsBfJDT9sXw8s5grJCau7REl4BmdBdxTwu6HcRbNwrHKvUolmRx3Ge9IpQ== X-Received: by 2002:ac8:5853:: with SMTP id h19mr1479916qth.166.1638298348361; Tue, 30 Nov 2021 10:52:28 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-e478-4cc2-fb2f-8620.res6.spectrum.com. [2603:6081:7b01:cbda:e478:4cc2:fb2f:8620]) by smtp.gmail.com with ESMTPSA id k85sm9952432qke.134.2021.11.30.10.52.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 10:52:27 -0800 (PST) Date: Tue, 30 Nov 2021 13:52:25 -0500 From: Tom Rini To: Andy Shevchenko Cc: u-boot@lists.denx.de, Simon Glass Subject: Re: [PATCH v1 1/1] binman: Do not pollute source tree when build with `make O=...` Message-ID: <20211130185225.GJ24579@bill-the-cat> References: <20211130184204.61707-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EVEYT52tOpylV1yJ" Content-Disposition: inline In-Reply-To: <20211130184204.61707-1-andriy.shevchenko@linux.intel.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --EVEYT52tOpylV1yJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 30, 2021 at 09:42:04PM +0300, Andy Shevchenko wrote: > Importing libraries in Python caches the bytecode by default. > Since we run scripts in source tree it ignores the current directory > settings, which is $(srctree), and creates cache just in the middle > of the source tree. Move cache to the current directory. >=20 > Signed-off-by: Andy Shevchenko > --- > tools/binman/main.py | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/tools/binman/main.py b/tools/binman/main.py > index 8c1e478d54ce..d5ab59948ec9 100755 > --- a/tools/binman/main.py > +++ b/tools/binman/main.py > @@ -16,6 +16,13 @@ import sys > import traceback > import unittest > =20 > +# > +# Do not pollute source tree with cache files: > +# https://stackoverflow.com/a/60024195/2511795 > +# https://bugs.python.org/issue33499 > +# > +sys.pycache_prefix =3D os.path.relpath(os.path.dirname(sys.argv[0]), os.= environ['srctree']) > + > # Bring in the patman and dtoc libraries (but don't override the first p= ath > # in PYTHONPATH) > our_path =3D os.path.dirname(os.path.realpath(__file__)) Do we need some wrapper around this so it doesn't blow up on older than Python 3.8? Looking over the logs, we force 3.8 to be the minimum version, I think it's 3.6. Which means that we aren't documenting the minimum version well, and should. But, 3.8 is only 2 years old and I always get a little itchy around saying we need tools that feel to me to be super recent still. --=20 Tom --EVEYT52tOpylV1yJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmGmcukACgkQFHw5/5Y0 tyzoXQv/d8LbU0OcA96Le8WBWEOj3mqaoLzM37lhA7yinTI3qaHl2/f06ljGK4nZ YgXgRlt87b+8o6/sxA6qRNyVXuEMXVtUzSgQdsgG1pqeBZOIsenW3v4nYSYsXFpV Diqk/1O2taZRsnrFA0f3Q/1iFqbvGMdh6ayP3c/tQw1ijgkFSNxhTwT43X75oo9M XhW9YsnwhP1VtjhwG4lY8AkCZjtQWsyTB6rbw5dsD/AprwjaNVqGxIpyesqcDgKl ZJbEPvY+wxjeHY/WjXR6+deSB9jf1+H94GY+MaffKe2GhoHItp2+/AndEbX9al2X JdToLPZjN2+IKGsCey+E4YGGCLXvUeZ9ehMsXKZvNQ4Oh5V24+yCETazwwHwlgyK j+oDr8lldB3FdQ1AEFlj4UItYsgg+l/BjJoPzUuTMRZ7HBYuEUpa7EWU7SW28soO k+W9P8CZndIeQv/lnbFLxwSwHscesJ18KoQmWen4MXjyleqJIlD8egOEb+3sPlJa VSAqihWR =vFad -----END PGP SIGNATURE----- --EVEYT52tOpylV1yJ--