From nobody Tue Feb 7 19:38:34 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PBD3y27LSz3ncWW; Tue, 7 Feb 2023 19:39:58 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from xmailer.gwdg.de (xmailer.gwdg.de [134.76.10.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PBD3y047bz4cYc; Tue, 7 Feb 2023 19:39:57 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Authentication-Results: mx1.freebsd.org; none Received: from excmbx-03.um.gwdg.de ([134.76.9.218] helo=email.gwdg.de) by mailer.gwdg.de with esmtp (GWDG Mailer) (envelope-from ) id 1pPTor-000Bvz-2A; Tue, 07 Feb 2023 20:39:56 +0100 Received: from [192.168.178.23] (10.250.9.200) by EXCMBX-03.um.gwdg.de (134.76.9.218) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P521) id 15.1.2507.17; Tue, 7 Feb 2023 20:39:55 +0100 Message-ID: <16b4fecb-f7f4-4d01-6b23-56c121983a05@gwdg.de> Date: Tue, 7 Feb 2023 20:38:34 +0100 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: git: f5890bd3cbc6 - main - Revert "Mk/Uses/python.mk: Fix USE_PYTHON=pep517: always compile and install bytecode" To: Charlie Li CC: Po-Chuan Hsieh , , , References: <202302051941.315JfQOP071383@gitrepo.freebsd.org> <729ca691-4f25-a094-a6b4-99490674ecd0@freebsd.org> Content-Language: en-US Reply-To: Rainer Hurling From: Rainer Hurling In-Reply-To: <729ca691-4f25-a094-a6b4-99490674ecd0@freebsd.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.250.9.200] X-ClientProxiedBy: EXCMBX-12.um.gwdg.de (134.76.9.221) To EXCMBX-03.um.gwdg.de (134.76.9.218) X-Virus-Scanned: (clean) by clamav X-Rspamd-Queue-Id: 4PBD3y047bz4cYc X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:134.76.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Hi Charlie, Am 07.02.23 um 19:36 schrieb Charlie Li: > Po-Chuan Hsieh wrote: >> Those issues you mentioned might be a problem in the future but >> clearly not in the short term. >> I'm trying to fix an immediate problem which greatly affects the >> development. > They are problems now, because they impede any proper fixes. We have > been doing quite a few things wrong with Python packaging, and simply > fixing "immediate problems" doesn't work. >> It may not be good from your point of view but it really fixed the >> problem (see below). >> If you have a better solution, I'm fine with it. >> >> >>          Instead of compiling and installing bytecode at stage/package >> time, >>          there is a WIP, review D34739, that compiles and installs >> bytecode >>          at install time instead, using triggers. >> >> >> Thanks for pointing out a possible solution but it is still WIP. >> > It will be *the* solution, because bytecode is not meant to be packaged, > but only compiled at install or run-time at user's discretion. The only > reason why bytecode was packaged in operating system-level package > distributions is how most such systems lack a trigger function that we > now have. > > When Python packaging tooling is the final arbiter, bytecode is compiled > only after the installation process completes if the user does not > disable it. In our case, pkg(8) is the final arbiter, so such tasking > falls to pkg(8)'s triggers and not during stage/packaging. Just out of curiosity, do you expect the trigger to work with Portmaster? Best wishes, Rainer >> >>          The aforementioned build_fs_violations will be investigated. >> >> >> You could reproduce this problem as follows. >> 1. Revert d6583d67b69dbf690e6f102e1aec799cb7fd564a (change >> devel/py-importlib-metadata back to USE_PYTHON=pep517 which is the >> background) >> 2. Build a port with USE_PYTHON=pep517. I choose devel/py-pyls-black >> here. >> Now it failed earlier with devel/py-click. >> You could expect more ports to be failed/skipped while building >> hundreds of ports in my case. >> > Can't reproduce with a proper PEP-517 bootstrap tooling, which most > importantly does not have setuptools in the environment at all. If > anything, your build failure only demonstrates just how "problematic, > fragile and unreliable" compiling and installing bytecode at > stage/package time is. >