From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aJoaFX/u1WAOywAAgWs5BA (envelope-from ) for ; Fri, 25 Jun 2021 16:55:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sHvNEH/u1WB/CwAAB5/wlQ (envelope-from ) for ; Fri, 25 Jun 2021 14:55:59 +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 A4BEB20ED5 for ; Fri, 25 Jun 2021 16:55:58 +0200 (CEST) Received: from localhost ([::1]:34728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwnFN-0007xz-Ly for larch@yhetil.org; Fri, 25 Jun 2021 10:55:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwnBa-0003xw-9u for bug-guix@gnu.org; Fri, 25 Jun 2021 10:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwnBa-0004w2-0Z for bug-guix@gnu.org; Fri, 25 Jun 2021 10:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwnBZ-0004kI-Vb for bug-guix@gnu.org; Fri, 25 Jun 2021 10:52:01 -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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 25 Jun 2021 14:52:01 +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: Maxim Cournoyer Received: via spool by 49168-submit@debbugs.gnu.org id=B49168.162463269618190 (code B ref 49168); Fri, 25 Jun 2021 14:52:01 +0000 Received: (at 49168) by debbugs.gnu.org; 25 Jun 2021 14:51:36 +0000 Received: from localhost ([127.0.0.1]:46608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwnBA-0004jK-4b for submit@debbugs.gnu.org; Fri, 25 Jun 2021 10:51:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwnB8-0004j7-CV for 49168@debbugs.gnu.org; Fri, 25 Jun 2021 10:51:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48270) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwnB1-0004dC-LJ; Fri, 25 Jun 2021 10:51:27 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42476 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwnB1-00024A-DN; Fri, 25 Jun 2021 10:51:27 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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> Date: Fri, 25 Jun 2021 16:51:25 +0200 In-Reply-To: <87pmwbythg.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 24 Jun 2021 15:04:27 -0400") Message-ID: <87mtre2e1e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Leo Prikler , 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=1624632958; 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; bh=oj8QMFJknH2FO3STYwbQyu0abLGk+ytb1RNB9EN8Aok=; b=BCogXK3hAJvfHVeLzOAODrDsWZCwIJQVBrV2U/6icR3zIZSsq8eTUauz/aPU7u89YzKw0d rpJdOxg33Q+lzBCp8igPOl46BNy6CBBtLFZDf17vSeNdcBezEAM7EcQJsvbFQLQdL56hQz M6zoIUl0utdTKaHcd1rC10yGXJ/4j0lLElF1wBSxBdo+TS4g+Lkcbf7qStgzJZ2fbYggJF Uu1Q19VMfUBjudnWf5r5DR4FTR8BdgAix7Pt3N+UgVCTAf2n65b+IyCHNSks05ZUcEeVFF PA1Cxgq3e5xoEWn5E51pVn7M7Cs/Mll2aaRdX9BJJvzVMZOBN9F2UFjPS5tcJw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624632958; a=rsa-sha256; cv=none; b=mhFBq+cV8Tk2sem5pRNlFmQeztqqSVVjFpOyYnYurKG9XkEfvSxYxI55xjTgB5UtEHTrQK M2NwsqpgJfrhIPY7pXbj6Wato6j4HWvtqJ8+psKmXvrDIueeVQNarSjNmLixYeHhmW+J8z Yls1aYMAKBIRFM1+j9qEhCwM1a2SRoqiegCZFbtn8ueWxmDHnd10M9su9hXPb6ReZ8jTXg T0DlEhSXqQd5hy8gqGbEHPtm4wSccjRnOlaq49OROTggKdYFbMqEA+CfGd+Djeg7K9jVaj vWv9PAbftBKgi3aDo0qFENWM4FbwS9FbsiiAVhlA/5AVRAeeqjMG7YElzIO8Wg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: A4BEB20ED5 X-Spam-Score: -2.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: 01bbUlnlbeZG Hello, Maxim Cournoyer skribis: > Ludovic Court=C3=A8s 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, fallb= ack to > + ;; reading the "requires.txt" from the egg-info directory from the sou= rce > + ;; 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 =E2=80=98gu= ix import pypi tablib=E2=80=99 produces is missing =E2=80=98python-setuptools-= scm=E2=80=99. Indeed, =E2=80=98METADATA=E2=80=99 doesn=E2=80=99t mention it. Is it really a bug on their side, or is it something peculiar about Guix packaging? Perhaps =E2=80=98python-setuptools-scm=E2=80=99 should be provi= ded more or less by default? > Having the code you wrote to allow importing optional dependencies is > still a nice (optional) option to have though. It was originally left > out based on comments from Ricardo that it wouldn't make a good default > due to raising the packaging effort. OK. Looking at , the =E2=80=98METADATA=E2=80=99 format apparently doesn=E2=80=99t support option= al dependencies anyway (which makes sense, because Wheels are a binary format), so perhaps that idea was misguided. (However =E2=80=98METADATA=E2=80=99 defines =E2=80=98Requires-External=E2= =80=99, which the importer could usefully interpret!) WDYT? Ludo=E2=80=99.