From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id lC53BJb11WB82gAAgWs5BA (envelope-from ) for ; Fri, 25 Jun 2021 17:26:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2EwsO5X11WBLGAAA1q6Kng (envelope-from ) for ; Fri, 25 Jun 2021 15:26:13 +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 0C48720337 for ; Fri, 25 Jun 2021 17:26:13 +0200 (CEST) Received: from localhost ([::1]:41982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwnid-0006EC-66 for larch@yhetil.org; Fri, 25 Jun 2021 11:26:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwniU-0006Cd-MN for bug-guix@gnu.org; Fri, 25 Jun 2021 11:26:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35113) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwniU-0001yf-EW for bug-guix@gnu.org; Fri, 25 Jun 2021 11:26:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwniU-0005eM-3r for bug-guix@gnu.org; Fri, 25 Jun 2021 11:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49168: =?UTF-8?Q?=E2=80=98guix?= import =?UTF-8?Q?pypi=E2=80=99?= misses package dependencies Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 25 Jun 2021 15:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49168 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 49168-submit@debbugs.gnu.org id=B49168.162463476021709 (code B ref 49168); Fri, 25 Jun 2021 15:26:02 +0000 Received: (at 49168) by debbugs.gnu.org; 25 Jun 2021 15:26:00 +0000 Received: from localhost ([127.0.0.1]:46659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwniS-0005e5-Dc for submit@debbugs.gnu.org; Fri, 25 Jun 2021 11:26:00 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:31403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwniP-0005ds-Uc for 49168@debbugs.gnu.org; Fri, 25 Jun 2021 11:25:59 -0400 Received: from nijino.local (62-116-34-49.adsl.highway.telekom.at [62.116.34.49]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GBLRx62fnz3x71; Fri, 25 Jun 2021 17:25:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1624634750; bh=+xYaSGYidNPOnUjtBzPtl/BwEpjAhLlFdi57J6g7hSU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=Y3A41JNYIZ4yyA/QpmnGbJtZPPgesWDlWgcjSX9sWBJAaY0YobPIxj955/u+TJK+G fbxtNkqS1xIEqJdj0bwGYvdULjhB1IREFIebmjYxXjXbtc63DVxf3BxbpWA6NYa4Zj 7KpTIAdxV9f7UtyIBwsKYsb+17SU65znHBD5LY34= Message-ID: <18276660c96637b7a17db80ca0712f2ea308aa2d.camel@student.tugraz.at> From: Leo Prikler Date: Fri, 25 Jun 2021 17:25:48 +0200 In-Reply-To: <87mtre2e1e.fsf@gnu.org> References: <877dim5psf.fsf@inria.fr> <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@student.tugraz.at> <87eecu3wqh.fsf@inria.fr> <87mtrgyaxe.fsf@gnu.org> <7da007493c9bcea075a76dc01d6e85b457c5d4e3.camel@student.tugraz.at> <87a6nftwio.fsf@gnu.org> <87pmwbythg.fsf@gmail.com> <87mtre2e1e.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 49168@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624634773; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+xYaSGYidNPOnUjtBzPtl/BwEpjAhLlFdi57J6g7hSU=; b=ON9RfaKUTrfCYgXjcxjfeKhdOt6hzY0Mu55UvHaYiNurZKV6kSQrouV2/PHD6dmW17mUjI l7DxSwn/DIs+Wukf+lUG9ISV42DXi47yqdudQ9TVfFlvhLh0/R+b55kjEh+B9ajw213uZV khWnIf++oZtfiBQ6ku2nV/RTyEbqP3mBsvwBLEw8+VH+EQRsgEMEITQX2pRL9hvlnnwqF2 nlM+a5FLGa5dVaOr9Mrwk1Ywgc4aLnPDJXBwoLD2et1+fmBru1rMTXu24VQjLoaC/5vrlD nXci6jh4hzxELG6HFjA7Ne9K7SgwqnhYJaxS+sVA8A7WlebfqszyAkPfCv76qg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624634773; a=rsa-sha256; cv=none; b=dA/zJvlFWh6kDxEbr59CYZyy15cM9kRfd5M9vkN3biTQgloqZvJH7fV3+3GfyOvPG3yxgC Ql71wtLUNfFsBMWbHodPGG0bPyVSAnqIPjM1CB430ZHN1y7dmHn8QhFpf7E+fmP4ASHCD1 MK08HEi/eQF0E6YoH2w4iIUoWJvM3RWWL8Uuc2fUjj41ohZ/mPA/kwjdRRrHIecTKaQboU 10H/ZaGc9dFVtLoPQ7I4DVI5kslnZ/H+zXrbPhJGziklniodSI+/bOftSHGP4QQmJTuxim b+8CkzAR/N1pO57l0jA4MwRmtwjbDfuzQ6FPoXa5x+b8G7CJWpaJeL4VGf9Tww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=Y3A41JNY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=Y3A41JNY; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 0C48720337 X-Spam-Score: -1.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: BzPfd9lag8tG Am Freitag, den 25.06.2021, 16:51 +0200 schrieb Ludovic Courtès: > Hello, > > Maxim Cournoyer skribis: > > > Ludovic Courtès writes: > > [...] > > > > Why does the importer favor .whl in the first place? Is it > > > supposed to > > > be more accurate or more widespread or something? > > > > Yes, the METADATA file from the binary wheel is a better place to > > look > > than the source egg-info requires.txt file. In my commit > > 01589acc5e1, I > > simplified a comment that used used to read as: > > > > - ;; First, try to compute the requirements using the wheel, since > > that is the > > - ;; most reliable option. If a wheel is not provided for this > > package, try > > - ;; getting them by reading either the "requirements.txt" file or > > the > > - ;; "requires.txt" from the egg-info directory from the source > > tarball. Note > > - ;; that "requirements.txt" is not mandatory, so this is likely > > to fail. > > + ;; First, try to compute the requirements using the wheel, else, > > fallback to > > + ;; reading the "requires.txt" from the egg-info directory from > > the source > > + ;; tarball. > > > > The wheel (.whl) binary format is well specified as PEP 427 [0] and > > is > > what pip primarily uses for installing Python packages, making it a > > very > > reliable source of metadata. The Python egg is the predecessor of > > the > > wheel, and can be considered obsolete, which explains why it's used > > as a > > fallback. > > Oh, I see. > > > Perhaps it'd be best to raise the issue to the package maintainers > > and > > have them specify their metadata correctly? > > Going back to the example at the beginning of this thread, what ‘guix > import pypi tablib’ produces is missing ‘python-setuptools-scm’. > Indeed, ‘METADATA’ doesn’t mention it. > > Is it really a bug on their side, or is it something peculiar about > Guix > packaging? Perhaps ‘python-setuptools-scm’ should be provided more > or > less by default? Perhaps both? It probably depends on how setuptools are used, but this use appears internal to the mechanisms of setuptools itself and not something, that requires.txt is concerned about. In particular, I think it is only relevant to the setup.py script and can probably be detected by the presence of a certain form within it. I'm not sure on the number of packages, that use this package vs. those that don't, but I personally don't think we should make it an input in every package. It is probably already a native-input to those that need it (or at least probably should be if it's propagated instead). Of course we would also have to look at the METADATA of other packages and check whether they actually mention python-setuptools-scm or are also unaware of the dependency. Regards, Leo