From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qCRNIg0z2mDp5AAAgWs5BA (envelope-from ) for ; Mon, 28 Jun 2021 22:37:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +vDoHQ0z2mArdQAA1q6Kng (envelope-from ) for ; Mon, 28 Jun 2021 20:37:33 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9BF0B1E1F8 for ; Mon, 28 Jun 2021 22:37:32 +0200 (CEST) Received: from localhost ([::1]:34078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxy0Z-0001Zx-7Y for larch@yhetil.org; Mon, 28 Jun 2021 16:37:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxy0J-0001V0-KZ for guix-devel@gnu.org; Mon, 28 Jun 2021 16:37:15 -0400 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:58354) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxy0G-00031Y-U7 for guix-devel@gnu.org; Mon, 28 Jun 2021 16:37:15 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4GDKCm2pzrz1s5l5; Mon, 28 Jun 2021 22:37:08 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4GDKCm1l74z1r0wp; Mon, 28 Jun 2021 22:37:08 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id y9o-7BVejmon; Mon, 28 Jun 2021 22:37:06 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-63-88.dynamic.mnet-online.de [188.174.63.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 28 Jun 2021 22:37:06 +0200 (CEST) Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id 6C59060082; Mon, 28 Jun 2021 22:37:21 +0200 (CEST) Subject: Re: Questions regarding Python packaging To: Lars-Dominik Braun References: <20201108142717.lmud5h4gh44vtjc6@melmoth> <1609946775.8blxygrg9p.astroid@rafflesia.none> <1611303651.35tpgtn1z1.astroid@melmoth.none> <1622997703.qcpe1ehxem.astroid@melmoth.none> <520a5492-6467-bbfc-3252-f17a5cc5d16f@crazy-compilers.com> From: Hartmut Goebel Organization: crazy-compilers.com Message-ID: <681eb450-0185-a465-3ed1-8446e8ad0974@crazy-compilers.com> Date: Mon, 28 Jun 2021 22:37:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: none client-ip=2001:a60:0:28:0:1:25:1; envelope-from=h.goebel@crazy-compilers.com; helo=mail-out.m-online.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org, 46848@debbugs.gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624912653; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BULW10AvnUPvxehqCRqnG8U5sGCYtWIvb06gw1nfv0w=; b=EuDfXKyVHHLSAPi9oS4r7uonvG7POPXvZ/aobgAf6bt2nEnq5Qx/AnFL4FWtVcZI1DLT91 OIAFpQTcZHF9MbIfjnLjnH/jJlmi/EvD3nRtNggnZWpWhXK4NpCrvAbF8KV9Ub1O+9/b/F jEOXc11Ciq4HkN4VN5LeYq9gdM5kUSncAEB7zZDAVzSvM5qoNbs1Oax30zfkNvtoYBYB/m ShjsCjRDTIVXAqdU5y3zq4BQ59huyFc2vj4qJIg8bdLGjnJ0a1hCLybMtCzV5PlKRHKogE QXsDqKXFnTIsoO7fI5yxXyZ2qf/DDLSmoKRXK1WrLGyIL/N0/B47xkbdimi35w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624912653; a=rsa-sha256; cv=none; b=s6LUq2Ea7jSr7A2oT0VLbYd9C+8hhbP4pEPPkXwHGIH60PgG5P8Y1D4Re5ss7KKJxQhed0 Pj7yI3lO6zHJ0wUuXGF2YDsa3NGuKhc/oSdrRXpB/a3OaB0eVVHOOujD1kVFxTa/zZMBqo 4qBoraYWeXufcdIW+iUp420BsfmgTMyg1/j9BgpD4mTx59vyqY8+pammWdXhVAB78J1ZeK L4cPViGLan9g+n+73+a851EosKNc+toyRTuYZv3VnVIP9IiETukPZn8v9JCb1aXflROGc4 QjZBdnwULMY4LvK7ZSzNHeitdIwDfshm0jLdurB+dsSMSw8XgZHl4+6exRorSA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 9BF0B1E1F8 X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: ekjOzsf9x+uX Hi Lars-Dominik, Am 28.06.21 um 13:59 schrieb Lars-Dominik Braun:* >> Not installing pip by default might break some user's environments. >> Anyhow, since using pip in guix is not such a good idea anyway, this >> should be okay. > True. We could rename python→python-minimal-interpreteronly (or similar; > given that python-minimal already exists) and python-toolchain→python to > work around that. What should be the use of having a package without pip? Anything else than saving a few KB? >> [setuptools-shim has been removed] > Is this relevant though? I doubt many packages are still importing > distutils and the few that do can be patched. Was I wrote: This code is still in pip, so I assume it is still relevant. I don't think patching is a good idea. It requires effort (implementing, reviewing), which can be saved by keeping exisiting and tested code. >> set-SOURCE-DATE-EPOCH: This implementation makes the code depend on >> wheel and wheel being used for installation. > Technically it depends on the wheel builder understanding > SOURCE_DATE_EPOCH (not necessarily python-wheel). I’d say that’s > acceptable and it’d be preferable to fix build systems not respecting > this variable imo. For this case please change the comment not not referring to wheel in this way. More something like "we expect the builder to support SOURCE_DATE_EPOCH, like wheel does" Anyhow, *m not actually convinced that we should throw away the old code. I can imagine in the next cuple of years quite some new build-systems to arrive, most of which will most probably not support SOURCE_DATE_EPOCH in the beginning, and thus making package's life harder. > >> Why has rename-pth-file been removed? Are you sure .pth-files are >> never created anymore nowerdays? > Given that easy-install has been deprecated I think it’s safe to remove > this phase and flag any packages creating this easy-install.pth as > broken. (There are, however, legitimate packages creating files like > ruamel.yaml-0.15.83-py3.8-nspkg.pth.) What exaclty do you mean with "flag as broken"? Will anybody (you? ;-) verify *all* current packages to not be "broken" prior to merging this change? Anyhow, again, I'm not convinced we should remove this phase now. .pth-file are deprecated only, but still supported. By removing this phase we might create conflict cased we can not foresee. And I would keep it even if one analyzes none of the current packages is "broken" - just do be on the save side fpr avoiding user trouble. (These issues will show up at the user, and are hard to track down, since noone will think about .pth files) > >> python-hashbang: Isn't this done already by the normal >> "patch-shebangs" phase after install in  gnu-build-system? (BTW: >> these are called *she*bangs). > Afaik the function patch-shebang expects a leading slash and thus it > does not replace this “special” shebang (see > https://www.python.org/dev/peps/pep-0427/#installing-a-wheel-distribution-1-0-py32-none-any-whl; > Spread, point 3). IC. Please add a comment to make this clear (e.g. "handle shebang of scripts generated by wheel missing leading slash") >> * >> >> I suggest to have phase compile-bytecode still honor older versions >> of python > I’m not sure what you mean. compileall is also part of Python 2. The old code did not compile the source for Python <3.7. Please see the comment of the old code for rational. >> As I Python developer I nowerdays would expect pip and venv (which is >> part of the std-lib - but not the virualenv, which is a separate module) >> to be availalbe when installing "python". Anyhow I could live with pip >> being a separate package. > If we keep setuptools/pip bundled, we don’t have to do any of this > pypa-build dance. We could also modernize python-build-system around > `pip install` and just be done with it. (I don’t have a proof-of-concept > for that yet.) AFAIK this might not be true if other build systems not using setuptools at all might show up. And isn't this the main reason for all your work? > >> The gnu-build-system already provides the "unzip" binary (used in phase >> "unpack"). So we could simply use this. Otherwise I recommend using the >> Python zip module, as this is what is used for creating the zip-archives >> :-) > I’m using Python’s zipfile module already. Fine, so you can safely remove the respective comment ;-) -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |