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 iJEIEOi52WDLgQEAgWs5BA (envelope-from ) for ; Mon, 28 Jun 2021 14:00:40 +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 kEDTC+i52WCHEgAA1q6Kng (envelope-from ) for ; Mon, 28 Jun 2021 12:00:40 +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 3FF601423F for ; Mon, 28 Jun 2021 14:00:39 +0200 (CEST) Received: from localhost ([::1]:49662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lxpwL-00059L-Vz for larch@yhetil.org; Mon, 28 Jun 2021 08:00:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lxpvW-000569-Up for guix-devel@gnu.org; Mon, 28 Jun 2021 07:59:46 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:9534) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1lxpvT-0006kR-Dh for guix-devel@gnu.org; Mon, 28 Jun 2021 07:59:46 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4GD5kd4L0KzQjbF; Mon, 28 Jun 2021 13:59:37 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1624881575; h=from:from: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; bh=O43vvCscLBCAWmXk4mcJskRqp3wXeaZ6QLKnm8sOtgg=; b=FIQ8ptnPH+f2QqwgKa6o4FP/FeJ80VfGVBpTRbDbio6s4v6m5Mpfhw8tXTZOQ4n+IW2ZSz PqWutFRfRthxcPCQ1klb9JgJp2SQmQE0WVOt2cR/dsVzS3PfSFqkJt9WXaecPxDfqZdFgW g9I5RI9D4C/1cEosl6o3S9B4HRxBWNmDTqVZWQuAKPD72qbh9GBzk4CyNn9JLd4NVcc4NJ t8dc4v2mn7xGS+nONGGQfJ1UteGEjBZX+0OEPY9iivVof20fvOVJpHr/mrVDU8rxqaCVfT 1FkWFQbkRzbXj6ds80BlhR72Ud9V0ybtVobRDFsdZWNuRqxT59MRJe7ukImQwA== Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id 4Z3uC8ySDuZF; Mon, 28 Jun 2021 13:59:33 +0200 (CEST) Date: Mon, 28 Jun 2021 13:59:31 +0200 From: Lars-Dominik Braun To: Hartmut Goebel Subject: Re: Questions regarding Python packaging Message-ID: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <520a5492-6467-bbfc-3252-f17a5cc5d16f@crazy-compilers.com> X-MBO-SPAM-Probability: X-Rspamd-Score: -6.99 / 15.00 / 15.00 X-Rspamd-Queue-Id: 351451847 X-Rspamd-UID: 9e6b9b Received-SPF: pass client-ip=80.241.56.172; envelope-from=lars@6xq.net; helo=mout-p-202.mailbox.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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=1624881639; 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:dkim-signature; bh=O43vvCscLBCAWmXk4mcJskRqp3wXeaZ6QLKnm8sOtgg=; b=URWOWxcJUza1OzHfd2aQb1l5PwXOgOOywaR8Izq6t2CuBSWar6cRutoSH6uj4gZnYlnGKi DJQiAktW7HOZydfIioavGCVyYGI9QeAyPwlrwrAYCJoajmYR/sE1MYi1kgrClYeKcgk/rc eU1N5WJM/4Y7yoIr9JMxW78dfgt3lOleF+PYQip2+y8hMtBNJfidY003PZVYSbLm5wztGF mypwz5E8swmaAAlYl8u8aVSfanjASTgi3kSEdcWuL0diL1kO6Ye+EXH3czWKBufljxEPxE Wp+XFqIJqpZTLY6isfbO6qkzq/XvxdbKqiuC+XbDGUgixzVINchBETZFE+wfpw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624881639; a=rsa-sha256; cv=none; b=THRgqarmWuawcvYRR06ExPwhPoZm1SLSoSUnauatiDga0rDqgKOKoZKNDFTZqdo+hzP7lx swlbGYe9bE3z0aDQG9lrcHdvjieLaAYxp+DvYPkEFs9X0b5H08Kr3w3lFyHRQ4P0oai/D8 nOUBd+FyjMSlmEdsVlX/90ENepujzy4Hd1JRkcuvIlm/SrblFHdBrPGjKn2fZSRwhC7Zug ib0kidovkYOZOIR8iOl1V28UOkm2xYpKRN1wD6rhagTDOHqlJzVsNj7f0tjLYkLWzwm9Ki il/HOzCBquu4dXCMwvVMc5dyVjUn4JUbFwNJ3pNg/dUt/dH9iKUTiaWw/Mn8bQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=FIQ8ptnP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=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: -1.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=FIQ8ptnP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=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: 3FF601423F X-Spam-Score: -1.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1HPC6myGyiGv Hi Hartmut, > sorry for being late for commenting on this (the time I can spend on > guix is rather limited atm). no problem, same thing on my side. > * > > 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. > * > > "use-setuptools" is gone. There are still about 10 packages with > "#:use-setuptools #f" - which means they are (expected to be) > incompatible with setuptools for some reason. You might want to > check whether these packages actually still can't be packages with > setuptools. Yeah, I’ve seen those, but the number was too small to bother for now. I’ll have a look later. > * > > setuptools-shim has been removed. I don't think this is a good idea, > since this peace of code enforces packages to be actually build with > setuptools instead of old distutils. This code is still in current > pip, so I assume it is still required. > > (This shim ensures setuptools is used, even if setup.py only imports > distutils. And setuptools is required for some options like > ""--single-version-externally-managed" - as the comment for the shim > says.) Is this relevant though? I doubt many packages are still importing distutils and the few that do can be patched. > * > > set-SOURCE-DATE-EPOCH: Please keep the verbose rational. It's much > more helpful than the new one-line comment. You mean the one from the now-removed ensure-no-mtimes-pre-1980? Sure. > * > > 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. > * > > 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.) > * > > 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). > * > > 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. > pypa bulld is where the PyPA is pushing towards. Anyhow, as of today, as > far as I can see, adoption is low. Of pypa build? That is true. > AFAIK fhere is no standard way for running tests in python. pytest seems > to be the most modern test-system. Anyhow packages still use nose or tox > (which again might run pytest or nose, with parameters fetched from > tox.ini). So I'm afraid, there is no general rule. > > Did the PyPA publish some recommendations or PEP on this? I’m not aware of any accepted PEP’s. There is a discussion about the removal of `python setup.py test`: https://github.com/pypa/setuptools/issues/931 And a proposal for pyproject.toml going nowhere: https://discuss.python.org/t/proposal-for-tests-entry-point-in-pyproject-toml/2077/2 > 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.) > "python-toolchain" sounds oversized for me. Would this include the > C-compiler, too (which one? maybe I want to build cross). I'd rather not > have such a package. See suggestion above wrt renaming. > 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. Cheers, Lars