GNU bug report logs - #49168
‘guix import pypi’ misses package dependencies

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Ludovic Courtès <ludovic.courtes@HIDDEN>; dated Tue, 22 Jun 2021 07:21:01 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 25 Jun 2021 15:26:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 25 11:26:00 2021
Received: from localhost ([127.0.0.1]:46659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lwniS-0005e5-Dc
	for submit <at> 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 <leo.prikler@HIDDEN>) id 1lwniP-0005ds-Uc
 for 49168 <at> 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@HIDDEN>
Subject: Re: bug#49168: =?UTF-8?Q?=E2=80=98guix?= import
 =?UTF-8?Q?pypi=E2=80=99?= misses package dependencies
From: Leo Prikler <leo.prikler@HIDDEN>
To: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, Maxim Cournoyer
 <maxim.cournoyer@HIDDEN>
Date: Fri, 25 Jun 2021 17:25:48 +0200
In-Reply-To: <87mtre2e1e.fsf@HIDDEN>
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 <87eecu3wqh.fsf@HIDDEN>
 <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
 <87mtrgyaxe.fsf@HIDDEN>
 <7da007493c9bcea075a76dc01d6e85b457c5d4e3.camel@HIDDEN>
 <87a6nftwio.fsf@HIDDEN> <87pmwbythg.fsf@HIDDEN>
 <87mtre2e1e.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49168
Cc: 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Am Freitag, den 25.06.2021, 16:51 +0200 schrieb Ludovic Courtès:
> Hello,
> 
> Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis:
> 
> > Ludovic Courtès <ludo@HIDDEN> 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





Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 25 Jun 2021 14:51:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 25 10:51:36 2021
Received: from localhost ([127.0.0.1]:46608 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lwnBA-0004jK-4b
	for submit <at> 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 <ludo@HIDDEN>) id 1lwnB8-0004j7-CV
 for 49168 <at> 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 <ludo@HIDDEN>)
 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 <ludo@HIDDEN>)
 id 1lwnB1-00024A-DN; Fri, 25 Jun 2021 10:51:27 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#49168: =?utf-8?Q?=E2=80=98guix?= import =?utf-8?Q?pypi?=
 =?utf-8?Q?=E2=80=99?= misses package dependencies
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 <87eecu3wqh.fsf@HIDDEN>
 <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
 <87mtrgyaxe.fsf@HIDDEN>
 <7da007493c9bcea075a76dc01d6e85b457c5d4e3.camel@HIDDEN>
 <87a6nftwio.fsf@HIDDEN> <87pmwbythg.fsf@HIDDEN>
Date: Fri, 25 Jun 2021 16:51:25 +0200
In-Reply-To: <87pmwbythg.fsf@HIDDEN> (Maxim Cournoyer's message of "Thu, 24
 Jun 2021 15:04:27 -0400")
Message-ID: <87mtre2e1e.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49168
Cc: Leo Prikler <leo.prikler@HIDDEN>, 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> 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 <https://www.python.org/dev/peps/pep-0345/>, 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.




Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 24 Jun 2021 19:04:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 24 15:04:38 2021
Received: from localhost ([127.0.0.1]:44162 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lwUeU-0001OO-8m
	for submit <at> debbugs.gnu.org; Thu, 24 Jun 2021 15:04:38 -0400
Received: from mail-qv1-f53.google.com ([209.85.219.53]:35817)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1lwUeQ-0001O3-ON
 for 49168 <at> debbugs.gnu.org; Thu, 24 Jun 2021 15:04:37 -0400
Received: by mail-qv1-f53.google.com with SMTP id h10so3888539qvz.2
 for <49168 <at> debbugs.gnu.org>; Thu, 24 Jun 2021 12:04:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=2uTRxXA8p4721oJhD0Kmg2DGFv8zc1b3tACIBi7CGtc=;
 b=owHYIZijtEopAcZgWX3l9W7cBFyM7OJ5u3/YmbndXF5tF5PgWQVMViBZvqXWLQ46oq
 pIwEcvsxK/41PyR1wTKqgFnmsYGICTG27OTEl2Pz6CcNQTjUD9RiJIoqyc6NLwg+z465
 lR54aq8ZeFcACPtXeOabgB3bMWZgydEhkFojzVMdFqCbVDugN7yltQYXpTWHzk7Z9w6L
 FPoIGEEriSjSVeJAkC6QxWIdypLkuIqSM/IEbH13OcSXeBIgQpeoXBH0xf8JdX31Ja5P
 UceY/eKWzVdr7qIHpr73lKvx0Bm6MZ+B08s11MMepp/dPZf1CIrpiYbXHyh2XZ8RJJEJ
 jGVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=2uTRxXA8p4721oJhD0Kmg2DGFv8zc1b3tACIBi7CGtc=;
 b=DFVl3C0tMVUgUW/sySGibH0uy/iiTPvGbRbmabc4qB/rGh/nZo8tpEyoPgwNmMpbsy
 qv1fYH9BV3doHhLQ5Hi+CSq1nx5Cf/I32w+LxTNwKOsjq9EEf1cn4HnqAiFkvAFeQ3E9
 qC2v4Szw5T5AVhtFZOiLGtKm+PCAEk7/qMD4VrpVF0n/DokpcVAkDiOz76qTjVu7Qfv+
 hEFLXVvjbBcMkq26wY3Y2z+iNX163TEzlNZK3k9C24FWGzT2jNnx9wWiRdetKpKNH+m0
 ITiHl6ZatRVSWinuH9aCOeR3M0axN3+89VboPEAVdvfEgUcsxD90AsCyUdI217Z32/yi
 oDTQ==
X-Gm-Message-State: AOAM532br/Hr3GN1Jq5eckglKVjOmLzwSv++jf4Dr4kcXx4GaXNPVv/O
 2NZbD61cMb6spPl0MfxDKomgZgFiH/WgyA==
X-Google-Smtp-Source: ABdhPJxpBaEzembAgviG+vewg3CJdupbLu+aK2kn1OjBYjOCQSyYQ+6DMd+KxcvWGT3/fULWgPaO+g==
X-Received: by 2002:a0c:ef8b:: with SMTP id w11mr7038655qvr.37.1624561469066; 
 Thu, 24 Jun 2021 12:04:29 -0700 (PDT)
Received: from hurd ([207.35.95.2])
 by smtp.gmail.com with ESMTPSA id d124sm3125413qkf.54.2021.06.24.12.04.28
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 24 Jun 2021 12:04:28 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#49168: =?utf-8?Q?=E2=80=98guix?= import =?utf-8?Q?pypi?=
 =?utf-8?Q?=E2=80=99?= misses package dependencies
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 <87eecu3wqh.fsf@HIDDEN>
 <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
 <87mtrgyaxe.fsf@HIDDEN>
 <7da007493c9bcea075a76dc01d6e85b457c5d4e3.camel@HIDDEN>
 <87a6nftwio.fsf@HIDDEN>
Date: Thu, 24 Jun 2021 15:04:27 -0400
In-Reply-To: <87a6nftwio.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Thu, 24 Jun 2021 11:57:51 +0200")
Message-ID: <87pmwbythg.fsf@HIDDEN>
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-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49168
Cc: Leo Prikler <leo.prikler@HIDDEN>, 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

[...]

> So I came up with the following patch, which adds a flag for optional
> dependencies, based on =E2=80=98requires.txt=E2=80=99.
>
> Unfortunately, it has no effect for =E2=80=98guix import pypi tablib=E2=
=80=99 because we
> only look at Wheel info in that case, as per:
>
>   ;; First, try to compute the requirements using the wheel, else, fallba=
ck to
>   ;; reading the "requires.txt" from the egg-info directory from the sour=
ce
>   ;; archive.
>   (or (guess-requirements-from-wheel)
>       (guess-requirements-from-source))
>
> AFAICS, wheels don=E2=80=99t provide that info, do they?
>
> 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. N=
ote
-  ;; that "requirements.txt" is not mandatory, so this is likely to fail.
+  ;; First, try to compute the requirements using the wheel, else, fallbac=
k 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.

Perhaps it'd be best to raise the issue to the package maintainers and
have them specify their metadata correctly?

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.

HTH,

Maxim

[0]  https://www.python.org/dev/peps/pep-0427/




Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 24 Jun 2021 09:58:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 24 05:58:03 2021
Received: from localhost ([127.0.0.1]:42492 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lwM7W-0002Cn-Nf
	for submit <at> debbugs.gnu.org; Thu, 24 Jun 2021 05:58:03 -0400
Received: from eggs.gnu.org ([209.51.188.92]:59728)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1lwM7U-0002C1-Mm
 for 49168 <at> debbugs.gnu.org; Thu, 24 Jun 2021 05:58:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41640)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1lwM7N-0005Br-P9; Thu, 24 Jun 2021 05:57:53 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=48426 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1lwM7N-0002N1-GG; Thu, 24 Jun 2021 05:57:53 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Leo Prikler <leo.prikler@HIDDEN>
Subject: Re: bug#49168: =?utf-8?Q?=E2=80=98guix?= import =?utf-8?Q?pypi?=
 =?utf-8?Q?=E2=80=99?= misses package dependencies
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 <87eecu3wqh.fsf@HIDDEN>
 <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
 <87mtrgyaxe.fsf@HIDDEN>
 <7da007493c9bcea075a76dc01d6e85b457c5d4e3.camel@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 6 Messidor an 229 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 24 Jun 2021 11:57:51 +0200
In-Reply-To: <7da007493c9bcea075a76dc01d6e85b457c5d4e3.camel@HIDDEN>
 (Leo Prikler's message of "Wed, 23 Jun 2021 16:17:11 +0200")
Message-ID: <87a6nftwio.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49168
Cc: 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,

Leo Prikler <leo.prikler@HIDDEN> skribis:

> Am Mittwoch, den 23.06.2021, 15:20 +0200 schrieb Ludovic Court=C3=A8s:
>> Hi,
>>=20
>> Leo Prikler <leo.prikler@HIDDEN> skribis:
>>=20
>> > Am Dienstag, den 22.06.2021, 14:33 +0200 schrieb Ludovic Court=C3=A8s:
>>=20
>> [...]
>>=20
>> > > Actually
>> > > <
>> > > https://files.pythonhosted.org/packages/fe/9d/4e15b2e74044ee051b6939=
c1b3ff716b0106e8f72d78eab8e08212eab44c/tablib-3.0.0.tar.gz
>> > > does not have a =E2=80=98requirements.txt=E2=80=99 file, and
>> > > <
>> > > https://files.pythonhosted.org/packages/16/85/078fc037b15aa1120d6a02=
87ec9d092d93d632ab01a0e7a3e69b4733da5e/tablib-3.0.0-py3-none-any.whl
>> > > doesn=E2=80=99t have much metadata, so I don=E2=80=99t even get wher=
e were get
>> > > that
>> > > info.
>> > It does, but it's well hidden in the src tree.  I peeked into the
>> > guix
>> > import code to find it.
>>=20
>> Indeed.  The tarball above has =E2=80=98tests/requirements.txt=E2=80=99:
>>=20
>> --8<---------------cut here---------------start------------->8---
>> pytest
>> pytest-cov
>> MarkupPy
>> odfpy
>> openpyxl>=3D2.6.0
>> pandas
>> pyyaml
>> tabulate
>> xlrd
>> xlwt
>> --8<---------------cut here---------------end--------------->8---
>>=20
>> There are no optional dependencies in that file, though.  Or were you
>> looking at something else?
> The importer and I are looking at something else:
>
> $ tar xfv tablib-3.0.0.tar.gz tablib-3.0.0/src/tablib.egg-
> info/requires.txt | xargs cat
>
> [all]
> markuppy
> odfpy
> openpyxl>=3D2.6.0
> pandas
> pyyaml
> tabulate
> xlrd
> xlwt
>
> [cli]
> tabulate
>
> [html]
> markuppy
>
> [ods]
> odfpy
>
> [pandas]
> pandas
>
> [xls]
> xlrd
> xlwt
>
> [xlsx]
> openpyxl>=3D2.6.0
>
> [yaml]
> pyyaml

Oooh, I see.

So I came up with the following patch, which adds a flag for optional
dependencies, based on =E2=80=98requires.txt=E2=80=99.

Unfortunately, it has no effect for =E2=80=98guix import pypi tablib=E2=80=
=99 because we
only look at Wheel info in that case, as per:

  ;; First, try to compute the requirements using the wheel, else, fallback=
 to
  ;; reading the "requires.txt" from the egg-info directory from the source
  ;; archive.
  (or (guess-requirements-from-wheel)
      (guess-requirements-from-source))

AFAICS, wheels don=E2=80=99t provide that info, do they?

Why does the importer favor .whl in the first place?  Is it supposed to
be more accurate or more widespread or something?

Thoughts?

Thanks,
Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 6731d50891..be01cc99d2 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright =C2=A9 2014 David Thompson <davet@HIDDEN>
 ;;; Copyright =C2=A9 2015 Cyril Roelandt <tipecaml@HIDDEN>
-;;; Copyright =C2=A9 2015, 2016, 2017, 2019, 2020 Ludovic Court=C3=A8s <lu=
do@HIDDEN>
+;;; Copyright =C2=A9 2015, 2016, 2017, 2019, 2020, 2021 Ludovic Court=C3=
=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2017 Mathieu Othacehe <m.othacehe@HIDDEN>
 ;;; Copyright =C2=A9 2018 Ricardo Wurmus <rekado@HIDDEN>
 ;;; Copyright =C2=A9 2019 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
@@ -232,10 +232,9 @@ the input field."
   "Given REQUIRES.TXT, a path to a Setuptools requires.txt file, return a =
list
 of lists of requirements.
=20
-The first list contains the required dependencies while the second the
-optional test dependencies.  Note that currently, optional, non-test
-dependencies are omitted since these can be difficult or expensive to
-satisfy."
+The first list contains the required dependencies, the second contains test
+dependencies, and the third one contains optional dependencies.  Note that
+optional, non-test dependencies can be difficult or expensive to satisfy."
=20
   (define (comment? line)
     ;; Return #t if the given LINE is a comment, #f otherwise.
@@ -249,6 +248,7 @@ satisfy."
     (lambda (port)
       (let loop ((required-deps '())
                  (test-deps '())
+                 (optional-deps '())
                  (inside-test-section? #f)
                  (optional? #f))
         (let ((line (read-line port)))
@@ -259,27 +259,33 @@ satisfy."
             ;; pytest >=3D 3 ; python_version >=3D "3.3"
             ;; pytest < 3 ; python_version < "3.3"
             (map (compose reverse delete-duplicates)
-                 (list required-deps test-deps)))
+                 (list required-deps test-deps optional-deps)))
            ((or (string-null? line) (comment? line))
-            (loop required-deps test-deps inside-test-section? optional?))
+            (loop required-deps test-deps optional-deps
+                  inside-test-section? optional?))
            ((section-header? line)
             ;; Encountering a section means that all the requirements
             ;; listed below are optional. Since we want to pick only the
             ;; test dependencies from the optional dependencies, we must
             ;; track those separately.
-            (loop required-deps test-deps (test-section? line) #t))
+            (loop required-deps test-deps optional-deps
+                  (test-section? line) #t))
            (inside-test-section?
             (loop required-deps
                   (cons (specification->requirement-name line)
                         test-deps)
+                  optional-deps
                   inside-test-section? optional?))
            ((not optional?)
             (loop (cons (specification->requirement-name line)
                         required-deps)
-                  test-deps inside-test-section? optional?))
+                  test-deps optional-deps
+                  inside-test-section? optional?))
            (optional?
-            ;; Skip optional items.
-            (loop required-deps test-deps inside-test-section? optional?))
+            (loop required-deps test-deps
+                  (cons (specification->requirement-name line)
+                        optional-deps)
+                  inside-test-section? optional?))
            (else
             (warning (G_ "parse-requires.txt reached an unexpected \
 condition on line ~a~%") line))))))))
@@ -314,7 +320,8 @@ returned value."
           (cond
            ((eof-object? line)
             (map (compose reverse delete-duplicates)
-                 (list required-deps test-deps)))
+                 (list required-deps test-deps
+                       '())))             ;XXX: no known optional dependen=
cies
            ((and (requires-dist-header? line) (not (extra? line)))
             (loop (cons (specification->requirement-name
                          (requires-dist-value line))
@@ -392,7 +399,7 @@ cannot determine package dependencies from source archi=
ve: ~a~%")
   (or (guess-requirements-from-wheel)
       (guess-requirements-from-source)))
=20
-(define (compute-inputs source-url wheel-url archive)
+(define* (compute-inputs source-url wheel-url archive)
   "Given the SOURCE-URL and WHEEL-URL of an already downloaded ARCHIVE, re=
turn
 a pair of lists, each consisting of a list of name/variable pairs, for the
 propagated inputs and the native inputs, respectively.  Also
@@ -419,17 +426,19 @@ return the unaltered list of upstream dependency name=
s."
     (values (map process-requirements dependencies)
             (concatenate dependencies))))
=20
-(define (make-pypi-sexp name version source-url wheel-url home-page synops=
is
-                        description license)
+(define* (make-pypi-sexp name version source-url wheel-url home-page synop=
sis
+                         description license
+                         #:key optional-dependencies?)
   "Return the `package' s-expression for a python package with the given N=
AME,
-VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
+VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE.  When
+OPTIONAL-DEPENDENCIES? is true, include optional dependencies."
   (call-with-temporary-output-file
    (lambda (temp port)
      (and (url-fetch source-url temp)
           (receive (guix-dependencies upstream-dependencies)
               (compute-inputs source-url wheel-url temp)
             (match guix-dependencies
-              ((required-inputs native-inputs)
+              ((required-inputs native-inputs optional-inputs)
                (when (string-suffix? ".zip" source-url)
                  (set! native-inputs (cons
                                      '("unzip" ,unzip)
@@ -462,7 +471,12 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION,=
 and LICENSE."
                        (base32
                         ,(guix-hash-url temp)))))
                    (build-system python-build-system)
-                   ,@(maybe-inputs required-inputs 'propagated-inputs)
+                   ,@(maybe-inputs
+                      (append required-inputs
+                              (if optional-dependencies?
+                                  optional-inputs ;TODO: emit a comment
+                                  '()))
+                      'propagated-inputs)
                    ,@(maybe-inputs native-inputs 'native-inputs)
                    (home-page ,home-page)
                    (synopsis ,synopsis)
@@ -472,9 +486,10 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION,=
 and LICENSE."
=20
 (define pypi->guix-package
   (memoize
-   (lambda* (package-name #:key repo version)
+   (lambda* (package-name #:key repo version optional-dependencies?)
      "Fetch the metadata for PACKAGE-NAME from pypi.org, and return the
-`package' s-expression corresponding to that package, or #f on failure."
+`package' s-expression corresponding to that package, or #f on failure.  W=
hen
+OPTIONAL-DEPENDENCIES? is true, include optional dependencies."
      (let* ((project (pypi-fetch package-name))
             (info    (and project (pypi-project-info project))))
        (and project
@@ -493,11 +508,17 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION=
, and LICENSE."
                               (project-info-summary info)
                               (project-info-summary info)
                               (string->license
-                               (project-info-license info)))))))))
+                               (project-info-license info))
+                              #:optional-dependencies?
+                              optional-dependencies?)))))))
=20
-(define (pypi-recursive-import package-name)
+(define* (pypi-recursive-import package-name #:key optional-dependencies?)
   (recursive-import package-name
-                    #:repo->guix-package pypi->guix-package
+                    #:repo->guix-package
+                    (lambda args
+                      (apply pypi->guix-package
+                             #:optional-dependencies? optional-dependencie=
s?
+                             args))
                     #:guix-name python->package-name))
=20
 (define (string->license str)
diff --git a/guix/scripts/import/pypi.scm b/guix/scripts/import/pypi.scm
index 33167174e2..58ae07f802 100644
--- a/guix/scripts/import/pypi.scm
+++ b/guix/scripts/import/pypi.scm
@@ -46,6 +46,8 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
   (display (G_ "
   -r, --recursive        import packages recursively"))
   (display (G_ "
+  -O, --optional         include optional dependencies"))
+  (display (G_ "
   -V, --version          display version information and exit"))
   (newline)
   (show-bug-report-information))
@@ -62,6 +64,9 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
          (option '(#\r "recursive") #f #f
                  (lambda (opt name arg result)
                    (alist-cons 'recursive #t result)))
+         (option '(#\O "optional") #f #f
+                 (lambda (opt name arg result)
+                   (alist-cons 'optional-dependencies? #t result)))
          %standard-import-options))
=20
 
@@ -85,6 +90,9 @@ Import and convert the PyPI package for PACKAGE-NAME.\n"))
                              value)
                             (_ #f))
                            (reverse opts))))
+    (define optional-dependencies?
+      (assoc-ref opts 'optional-dependencies?))
+
     (match args
       ((package-name)
        (if (assoc-ref opts 'recursive)
@@ -94,9 +102,13 @@ Import and convert the PyPI package for PACKAGE-NAME.\n=
"))
                    `(define-public ,(string->symbol name)
                       ,pkg))
                   (_ #f))
-                (pypi-recursive-import package-name))
+                (pypi-recursive-import package-name
+                                       #:optional-dependencies?
+                                       optional-dependencies?))
            ;; Single import
-           (let ((sexp (pypi->guix-package package-name)))
+           (let ((sexp (pypi->guix-package package-name
+                                           #:optional-dependencies?
+                                           optional-dependencies?)))
              (unless sexp
                (leave (G_ "failed to download meta-data for package '~a'~%=
")
                       package-name))

--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 23 Jun 2021 14:17:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 23 10:17:18 2021
Received: from localhost ([127.0.0.1]:41634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lw3gs-00013X-IL
	for submit <at> debbugs.gnu.org; Wed, 23 Jun 2021 10:17:18 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:48427)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo.prikler@HIDDEN>) id 1lw3gq-00010w-6s
 for 49168 <at> debbugs.gnu.org; Wed, 23 Jun 2021 10:17:17 -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 4G951h2SHWz3wPx;
 Wed, 23 Jun 2021 16:17:12 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1624457832;
 bh=wycnmYaOJZP3aj10QlR83mBCI9rswMIxIDt8JDLSePQ=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=o39/Oa7y10iog0u3Jrio7WpNkEfQ/s/JTtxXmZH/OYwbAvXo3QSVL5dyQhVs60Hu7
 YW/j0sEZncoJrzM/MWlmsjH6R3MjdiHzEI7Vio4hZnD4L0eg5xST7KDhuG48PF/ESB
 KEUuwr25mfoA+0gOat0WCSb+9uNN7mQuFo57Z7/A=
Message-ID: <7da007493c9bcea075a76dc01d6e85b457c5d4e3.camel@HIDDEN>
Subject: Re: bug#49168: =?UTF-8?Q?=E2=80=98guix?= import
 =?UTF-8?Q?pypi=E2=80=99?= misses package dependencies
From: Leo Prikler <leo.prikler@HIDDEN>
To: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
Date: Wed, 23 Jun 2021 16:17:11 +0200
In-Reply-To: <87mtrgyaxe.fsf@HIDDEN>
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 <87eecu3wqh.fsf@HIDDEN>
 <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
 <87mtrgyaxe.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49168
Cc: 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Am Mittwoch, den 23.06.2021, 15:20 +0200 schrieb Ludovic Courtès:
> Hi,
> 
> Leo Prikler <leo.prikler@HIDDEN> skribis:
> 
> > Am Dienstag, den 22.06.2021, 14:33 +0200 schrieb Ludovic Courtès:
> 
> [...]
> 
> > > Actually
> > > <
> > > https://files.pythonhosted.org/packages/fe/9d/4e15b2e74044ee051b6939c1b3ff716b0106e8f72d78eab8e08212eab44c/tablib-3.0.0.tar.gz
> > > does not have a ‘requirements.txt’ file, and
> > > <
> > > https://files.pythonhosted.org/packages/16/85/078fc037b15aa1120d6a0287ec9d092d93d632ab01a0e7a3e69b4733da5e/tablib-3.0.0-py3-none-any.whl
> > > doesn’t have much metadata, so I don’t even get where were get
> > > that
> > > info.
> > It does, but it's well hidden in the src tree.  I peeked into the
> > guix
> > import code to find it.
> 
> Indeed.  The tarball above has ‘tests/requirements.txt’:
> 
> --8<---------------cut here---------------start------------->8---
> pytest
> pytest-cov
> MarkupPy
> odfpy
> openpyxl>=2.6.0
> pandas
> pyyaml
> tabulate
> xlrd
> xlwt
> --8<---------------cut here---------------end--------------->8---
> 
> There are no optional dependencies in that file, though.  Or were you
> looking at something else?
The importer and I are looking at something else:

--8<---------------cut here---------------start------------->8---
$ tar xfv tablib-3.0.0.tar.gz tablib-3.0.0/src/tablib.egg-
info/requires.txt | xargs cat

[all]
markuppy
odfpy
openpyxl>=2.6.0
pandas
pyyaml
tabulate
xlrd
xlwt

[cli]
tabulate

[html]
markuppy

[ods]
odfpy

[pandas]
pandas

[xls]
xlrd
xlwt

[xlsx]
openpyxl>=2.6.0

[yaml]
pyyaml
--8<---------------cut here---------------end--------------->8---


> > > As for emitting comments, the (not-so-) pretty printer written
> > > for
> > > ‘guix
> > > style’¹ could come in handy for importers and more generally in
> > > any
> > > place where we need to emit comments.
> > Indeed, I wasn't thinking about that when I wrote this reply, but I
> > see
> > what you mean.  Should we strive to have such a pretty-printer in
> > Guile
> > as well or do we keep it to ourselves for now? :)
> 
> Let’s nurture it in Guix and move it to Guile when it looks better.
> Likewise, we should have support for comments directly in (ice-9
> read).
Sounds good to me.






Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 23 Jun 2021 13:20:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jun 23 09:20:56 2021
Received: from localhost ([127.0.0.1]:40593 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lw2oK-0007lN-3o
	for submit <at> debbugs.gnu.org; Wed, 23 Jun 2021 09:20:56 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34928)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1lw2oI-0007lA-SY
 for 49168 <at> debbugs.gnu.org; Wed, 23 Jun 2021 09:20:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36940)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1lw2oB-0008H5-I7; Wed, 23 Jun 2021 09:20:47 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33474 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1lw2oB-00032y-AT; Wed, 23 Jun 2021 09:20:47 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Leo Prikler <leo.prikler@HIDDEN>
Subject: Re: bug#49168: =?utf-8?Q?=E2=80=98guix?= import =?utf-8?Q?pypi?=
 =?utf-8?Q?=E2=80=99?= misses package dependencies
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 <87eecu3wqh.fsf@HIDDEN>
 <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 5 Messidor an 229 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Wed, 23 Jun 2021 15:20:45 +0200
In-Reply-To: <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
 (Leo Prikler's message of "Tue, 22 Jun 2021 14:37:55 +0200")
Message-ID: <87mtrgyaxe.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49168
Cc: 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Leo Prikler <leo.prikler@HIDDEN> skribis:

> Am Dienstag, den 22.06.2021, 14:33 +0200 schrieb Ludovic Court=C3=A8s:

[...]

>> Actually
>> <
>> https://files.pythonhosted.org/packages/fe/9d/4e15b2e74044ee051b6939c1b3=
ff716b0106e8f72d78eab8e08212eab44c/tablib-3.0.0.tar.gz
>> >
>> does not have a =E2=80=98requirements.txt=E2=80=99 file, and
>> <
>> https://files.pythonhosted.org/packages/16/85/078fc037b15aa1120d6a0287ec=
9d092d93d632ab01a0e7a3e69b4733da5e/tablib-3.0.0-py3-none-any.whl
>> >
>> doesn=E2=80=99t have much metadata, so I don=E2=80=99t even get where we=
re get that
>> info.
> It does, but it's well hidden in the src tree.  I peeked into the guix
> import code to find it.

Indeed.  The tarball above has =E2=80=98tests/requirements.txt=E2=80=99:

--8<---------------cut here---------------start------------->8---
pytest
pytest-cov
MarkupPy
odfpy
openpyxl>=3D2.6.0
pandas
pyyaml
tabulate
xlrd
xlwt
--8<---------------cut here---------------end--------------->8---

There are no optional dependencies in that file, though.  Or were you
looking at something else?

>> As for emitting comments, the (not-so-) pretty printer written for
>> =E2=80=98guix
>> style=E2=80=99=C2=B9 could come in handy for importers and more generall=
y in any
>> place where we need to emit comments.
> Indeed, I wasn't thinking about that when I wrote this reply, but I see
> what you mean.  Should we strive to have such a pretty-printer in Guile
> as well or do we keep it to ourselves for now? :)

Let=E2=80=99s nurture it in Guix and move it to Guile when it looks better.
Likewise, we should have support for comments directly in (ice-9 read).

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 22 Jun 2021 19:01:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 22 15:01:21 2021
Received: from localhost ([127.0.0.1]:39891 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lvleD-0007yn-HX
	for submit <at> debbugs.gnu.org; Tue, 22 Jun 2021 15:01:21 -0400
Received: from mail-qt1-f179.google.com ([209.85.160.179]:41530)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1lvleC-0007yZ-6q
 for 49168 <at> debbugs.gnu.org; Tue, 22 Jun 2021 15:01:20 -0400
Received: by mail-qt1-f179.google.com with SMTP id d9so228755qtx.8
 for <49168 <at> debbugs.gnu.org>; Tue, 22 Jun 2021 12:01:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=v/HWSb+BYtJ6ibjwNFQuMn36x1Zs4bqki6gdkWLW4EM=;
 b=idy5qaEA39c68ZTJ3as/iaK6PBXFjKDBiAO/SEAbo7z/N6wrECGQFuVLu3vpHPLchY
 zaHTEZvyWmxdfE63Z1bxv+J3Z+KS5k7ybm0L2weCEC0mzYr23WEAAX7EGqEfNU/xi1Bz
 eUbjaLIuZaB4KbZb5yH2zhnch2RVwUD0RqXnJysI9sUHeRXBWYqfv7VJFyZ4CV5pZEgs
 SWeF+6nVuJSPKBCPqaxdoCiDI/25bJ7Febacyd34hhctkAokZrpMfw9uaqzCkATI6XUT
 ymNbUtUdCB7kO3F9zoaQBDleA+opm6ATSYGxLCeqSlDoYnbujbyLRJdfTycVOjARjhyJ
 iRIQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=v/HWSb+BYtJ6ibjwNFQuMn36x1Zs4bqki6gdkWLW4EM=;
 b=iFoBWzge8+FDFq+OYGCbufJwueoC27IIz165dqgixi7eQuyathmIzTvLoqanipGK7f
 COppQ0pi9ctLlwN1vpdxDT20o9dk5GVLk3+5atkJPFdPkF4kPbKz5yex7ZthsX9cilec
 /wQCQfJBNpWaUYsMBFdpJKKTdNW+Dd+B+kRIDKUZklKD3a45ziPUUXFiOyzYl+dwLMyF
 VOS1yZw0GIJeJpWt1bqo0mvqXHWjjHU7gZM1rtWUdFCQPb+MAoQFYSp/XpClhX+b09Bf
 fweQIem4o9nxNVzmJDHdkAWEHGTEX0Ao/DuioTEK/CP+kruJJJdkaJGMcTK/K4DFvrss
 fHgw==
X-Gm-Message-State: AOAM5339OiXX4QEIjjSrXycMf2ULNFbvcoHNrkeg2sa4ZkBTGLZUlkj7
 R/SyBQbYKJhQB7b/dfkLwbYWGiistRRz4g==
X-Google-Smtp-Source: ABdhPJxL02V34dIknH29wPvKpTmDK3kuEMgy7xhuqKt+n5645yOpDzdJhUIHVL4+xM5qkH1N/USCjg==
X-Received: by 2002:ac8:5cca:: with SMTP id s10mr260590qta.116.1624388474594; 
 Tue, 22 Jun 2021 12:01:14 -0700 (PDT)
Received: from hurd (dsl-205-236-230-118.b2b2c.ca. [205.236.230.118])
 by smtp.gmail.com with ESMTPSA id o5sm13190248qkl.25.2021.06.22.12.01.13
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Jun 2021 12:01:14 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Leo Prikler <leo.prikler@HIDDEN>
Subject: Re: bug#49168: =?utf-8?Q?=E2=80=98guix?= import =?utf-8?Q?pypi?=
 =?utf-8?Q?=E2=80=99?= misses package dependencies
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 <87eecu3wqh.fsf@HIDDEN>
 <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
Date: Tue, 22 Jun 2021 15:01:13 -0400
In-Reply-To: <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
 (Leo Prikler's message of "Tue, 22 Jun 2021 14:37:55 +0200")
Message-ID: <875yy53erq.fsf@HIDDEN>
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-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 49168
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN>,
 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

Leo Prikler <leo.prikler@HIDDEN> writes:

> Am Dienstag, den 22.06.2021, 14:33 +0200 schrieb Ludovic Court=C3=A8s:
>> Hi,
>>=20
>> Leo Prikler <leo.prikler@HIDDEN> skribis:
>>=20
>> > > Here, some of tablib=E2=80=99s dependencies are missing; the same pr=
oblem
>> > > seems
>> > > to happen with python-django-import-export itself.
>> > >=20
>> > > Are we failing to parse some of the PyPI metadata?
>> > I don't think so, rather it appears as though the requires.txt is
>> > somehow malformed or ill-suited for importing.  It basically marks
>> > all
>> > inputs as optional.
>>=20
>> Oh.  So that=E2=80=99s first and foremost a bug of the PyPI package, rig=
ht?

Sounds like so, if the inputs are required but marked as optional.

>> > Perhaps we could instruct the importer to emit comments for
>> > optional
>> > inputs like so
>> > ;; Optional inputs by section
>> > ;; -- [SECTION]
>> > ;; ("python-some-package" ,python-some-package)
>> > ;; ("python-some-other-package" ,python-some-other-package)=20
>> > Maybe add a command line switch to toggle these comments or a way
>> > of
>> > assuming some section, e.g. [cli] to be the thing we want to build
>> > for
>> > a package.
>>=20
>> A CLI switch to include optional dependencies would be nice.

+1.

>> As for emitting comments, the (not-so-) pretty printer written for
>> =E2=80=98guix
>> style=E2=80=99=C2=B9 could come in handy for importers and more generall=
y in any
>> place where we need to emit comments.
> Indeed, I wasn't thinking about that when I wrote this reply, but I see
> what you mean.  Should we strive to have such a pretty-printer in Guile
> as well or do we keep it to ourselves for now? :)

This sounds good too, although I haven't read about that new fancy
printer yet.

Maxim




Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 22 Jun 2021 12:38:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 22 08:38:06 2021
Received: from localhost ([127.0.0.1]:38040 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lvffG-00074o-UX
	for submit <at> debbugs.gnu.org; Tue, 22 Jun 2021 08:38:06 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:4583)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo.prikler@HIDDEN>) id 1lvffD-00074E-PC
 for 49168 <at> debbugs.gnu.org; Tue, 22 Jun 2021 08:38:01 -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 4G8Qsc0G34z3wFM;
 Tue, 22 Jun 2021 14:37:56 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1624365476;
 bh=D69xdNC/vF1Fzfo+dpe/fjuwzAu/G6IMreoYk6GMgI8=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=khcUkVHDaZAWu6IbO0hFM2xwmbfCiuTdrZKQd4QLq+YvBT4iSF32Ra1x1pCYtNaBy
 a/twnO5lINXaFh1Jsj/6a2cv+/g8vKgrY9BfzruU8qguu3CWttCnNnFyuvvGcOps12
 g+mqh5MhfVBQqbmboLx0KwYNH7zhB+nA52vL0qcI=
Message-ID: <ab46529b6773ef0a1b73504470be29a757a3dc3a.camel@HIDDEN>
Subject: Re: =?UTF-8?Q?=E2=80=98guix?= import =?UTF-8?Q?pypi=E2=80=99?=
 misses package dependencies
From: Leo Prikler <leo.prikler@HIDDEN>
To: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludovic.courtes@HIDDEN>
Date: Tue, 22 Jun 2021 14:37:55 +0200
In-Reply-To: <87eecu3wqh.fsf@HIDDEN>
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 <87eecu3wqh.fsf@HIDDEN>
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.116
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49168
Cc: 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Am Dienstag, den 22.06.2021, 14:33 +0200 schrieb Ludovic Courtès:
> Hi,
> 
> Leo Prikler <leo.prikler@HIDDEN> skribis:
> 
> > > Here, some of tablib’s dependencies are missing; the same problem
> > > seems
> > > to happen with python-django-import-export itself.
> > > 
> > > Are we failing to parse some of the PyPI metadata?
> > I don't think so, rather it appears as though the requires.txt is
> > somehow malformed or ill-suited for importing.  It basically marks
> > all
> > inputs as optional.
> 
> Oh.  So that’s first and foremost a bug of the PyPI package, right?
> 
> Actually
> <
> https://files.pythonhosted.org/packages/fe/9d/4e15b2e74044ee051b6939c1b3ff716b0106e8f72d78eab8e08212eab44c/tablib-3.0.0.tar.gz
> >
> does not have a ‘requirements.txt’ file, and
> <
> https://files.pythonhosted.org/packages/16/85/078fc037b15aa1120d6a0287ec9d092d93d632ab01a0e7a3e69b4733da5e/tablib-3.0.0-py3-none-any.whl
> >
> doesn’t have much metadata, so I don’t even get where were get that
> info.
It does, but it's well hidden in the src tree.  I peeked into the guix
import code to find it.

> > Perhaps we could instruct the importer to emit comments for
> > optional
> > inputs like so
> > ;; Optional inputs by section
> > ;; -- [SECTION]
> > ;; ("python-some-package" ,python-some-package)
> > ;; ("python-some-other-package" ,python-some-other-package) 
> > Maybe add a command line switch to toggle these comments or a way
> > of
> > assuming some section, e.g. [cli] to be the thing we want to build
> > for
> > a package.
> 
> A CLI switch to include optional dependencies would be nice.
> 
> As for emitting comments, the (not-so-) pretty printer written for
> ‘guix
> style’¹ could come in handy for importers and more generally in any
> place where we need to emit comments.
Indeed, I wasn't thinking about that when I wrote this reply, but I see
what you mean.  Should we strive to have such a pretty-printer in Guile
as well or do we keep it to ourselves for now? :)

> Thanks,
> Ludo’.
> 
> ¹ https://issues.guix.gnu.org/49169





Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 22 Jun 2021 12:33:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 22 08:33:19 2021
Received: from localhost ([127.0.0.1]:38032 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lvfah-0006xU-1x
	for submit <at> debbugs.gnu.org; Tue, 22 Jun 2021 08:33:19 -0400
Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:31007)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1lvfaf-0006xE-JN
 for 49168 <at> debbugs.gnu.org; Tue, 22 Jun 2021 08:33:18 -0400
IronPort-HdrOrdr: =?us-ascii?q?A9a23=3AiMVknqsZGbZpHt/SoBOcXKcd7skDqtV00zEX?=
 =?us-ascii?q?/kB9WHVpm62j5ruTdZEgviMc5wx+ZJhNo7290eq7MBfhHOdOgLX5ZI3DYOCEgh?=
 =?us-ascii?q?rLEGgB1/qb/9SIIUSXnNK1s50QFpSWY+eeMbEVt6rHCUaDYrEdKXS8gcaVrPab?=
 =?us-ascii?q?5U1ECSttb7hk7w9/AAreKEtrXwNLbKBJd6Z0ovA33gadRQ=3D=3D?=
X-IronPort-AV: E=Sophos;i="5.83,291,1616454000"; d="scan'208";a="516036485"
Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201])
 by mail2-relais-roc.national.inria.fr with
 ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jun 2021 14:33:11 +0200
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludovic.courtes@HIDDEN>
To: Leo Prikler <leo.prikler@HIDDEN>
Subject: Re: =?utf-8?Q?=E2=80=98guix?= import =?utf-8?Q?pypi=E2=80=99?=
 misses package dependencies
References: <877dim5psf.fsf@HIDDEN>
 <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 4 Messidor an 229 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 22 Jun 2021 14:33:10 +0200
In-Reply-To: <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
 (Leo Prikler's message of "Tue, 22 Jun 2021 10:34:26 +0200")
Message-ID: <87eecu3wqh.fsf@HIDDEN>
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-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49168
Cc: 49168 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Leo Prikler <leo.prikler@HIDDEN> skribis:

>> Here, some of tablib=E2=80=99s dependencies are missing; the same problem
>> seems
>> to happen with python-django-import-export itself.
>>=20
>> Are we failing to parse some of the PyPI metadata?
> I don't think so, rather it appears as though the requires.txt is
> somehow malformed or ill-suited for importing.  It basically marks all
> inputs as optional.

Oh.  So that=E2=80=99s first and foremost a bug of the PyPI package, right?

Actually
<https://files.pythonhosted.org/packages/fe/9d/4e15b2e74044ee051b6939c1b3ff=
716b0106e8f72d78eab8e08212eab44c/tablib-3.0.0.tar.gz>
does not have a =E2=80=98requirements.txt=E2=80=99 file, and
<https://files.pythonhosted.org/packages/16/85/078fc037b15aa1120d6a0287ec9d=
092d93d632ab01a0e7a3e69b4733da5e/tablib-3.0.0-py3-none-any.whl>
doesn=E2=80=99t have much metadata, so I don=E2=80=99t even get where were =
get that
info.

> Perhaps we could instruct the importer to emit comments for optional
> inputs like so
> ;; Optional inputs by section
> ;; -- [SECTION]
> ;; ("python-some-package" ,python-some-package)
> ;; ("python-some-other-package" ,python-some-other-package)=20
> Maybe add a command line switch to toggle these comments or a way of
> assuming some section, e.g. [cli] to be the thing we want to build for
> a package.

A CLI switch to include optional dependencies would be nice.

As for emitting comments, the (not-so-) pretty printer written for =E2=80=
=98guix
style=E2=80=99=C2=B9 could come in handy for importers and more generally i=
n any
place where we need to emit comments.

Thanks,
Ludo=E2=80=99.

=C2=B9 https://issues.guix.gnu.org/49169




Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at 49168 <at> debbugs.gnu.org:


Received: (at 49168) by debbugs.gnu.org; 22 Jun 2021 08:34:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 22 04:34:42 2021
Received: from localhost ([127.0.0.1]:37711 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lvbrh-0006tw-ED
	for submit <at> debbugs.gnu.org; Tue, 22 Jun 2021 04:34:42 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:27211)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo.prikler@HIDDEN>) id 1lvbrd-0006tj-0S
 for 49168 <at> debbugs.gnu.org; Tue, 22 Jun 2021 04:34:36 -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 4G8KSg0wzhz3xlt;
 Tue, 22 Jun 2021 10:34:26 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1624350867;
 bh=6hsXAY3DO2jfoimu1nkyNLw7wwjpriq8GEvjD7mgMKA=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=b8RJDCG6xiKY+atwGAGruuz2fLhvrycmqdmKDbVkXeQvwJzPSj7mma8HvSxXGhOwj
 k/5GrrDBDT5QgoYLLYqNqd2hbgzaebJtmfjqtW+lzHgjUpGlCiqYvlKTriLgSzKcPL
 Rix3LKO+sb6CxZ/wFo5WdN9dXt2Os321fTpVuLKg=
Message-ID: <992e746ed43c5ae7def7b35996ed44743fef85bf.camel@HIDDEN>
Subject: Re: =?UTF-8?Q?=E2=80=98guix?= import =?UTF-8?Q?pypi=E2=80=99?=
 misses package dependencies
From: Leo Prikler <leo.prikler@HIDDEN>
To: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludovic.courtes@HIDDEN>, 
 49168 <at> debbugs.gnu.org
Date: Tue, 22 Jun 2021 10:34:26 +0200
In-Reply-To: <877dim5psf.fsf@HIDDEN>
References: <877dim5psf.fsf@HIDDEN>
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.116
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 49168
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Am Dienstag, den 22.06.2021, 09:20 +0200 schrieb Ludovic Courtès:
> Hi!
> 
> ‘guix import pypi -r django-import-export’ does not include all the
> inputs:
> 
> --8<---------------cut here---------------start------------->8---
> $ guix build -L /tmp/mods python-django-import-export
> 
> [...]
> 
> starting phase `build'
> running "python setup.py" with command "build" and parameters ()
> Download error on https://pypi.org/simple/setuptools_scm/: [Errno -2]
> Name or service not known -- Some packages may not be found!
> Download error on https://pypi.org/simple/setuptools-scm/: [Errno -2]
> Name or service not known -- Some packages may not be found!
> Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
> Download error on https://pypi.org/simple/: [Errno -2] Name or
> service not known -- Some packages may not be found!
> No local packages or working download links found for setuptools_scm
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "setup.py", line 5, in <module>
>     setup(
>   File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/setuptools/__init__.py", line 144,
> in setup
>     _install_setup_requires(attrs)
>   File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/setuptools/__init__.py", line 139,
> in _install_setup_requires
>     dist.fetch_build_eggs(dist.setup_requires)
>   File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/setuptools/dist.py", line 716, in
> fetch_build_eggs
>     resolved_dists = pkg_resources.working_set.resolve(
>   File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line
> 780, in resolve
>     dist = best[req.key] = env.best_match(
>   File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line
> 1065, in best_match
>     return self.obtain(req, installer)
>   File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/pkg_resources/__init__.py", line
> 1077, in obtain
>     return installer(requirement)
>   File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-packages/setuptools/dist.py", line 786, in
> fetch_build_egg
>     return cmd.easy_install(req)
>   File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-
> 3.8.2/lib/python3.8/site-
> packages/setuptools/command/easy_install.py", line 673, in
> easy_install
>     raise DistutilsError(msg)
> distutils.errors.DistutilsError: Could not find suitable distribution
> for Requirement.parse('setuptools_scm')
> command "python" "-c" "import setuptools,
> tokenize;__file__='setup.py';f=getattr(tokenize, 'open',
> open)(__file__);code=f.read().replace('\\r\\n',
> '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build"
> failed with status 1
> builder for `/gnu/store/74ph75dfy1i9hrx9n327j32ma2zv4hhd-python-
> tablib-3.0.0.drv' failed with exit code 1
> build of /gnu/store/74ph75dfy1i9hrx9n327j32ma2zv4hhd-python-tablib-
> 3.0.0.drv failed
> View build log at
> '/var/log/guix/drvs/74/ph75dfy1i9hrx9n327j32ma2zv4hhd-python-tablib-
> 3.0.0.drv.bz2'.
> cannot build derivation `/gnu/store/6xk0jk0qnjsazqgjihmpafsx3wfmxjf0-
> python-django-import-export-2.5.0.drv': 1 dependencies couldn't be
> built
> guix build: error: build of
> `/gnu/store/6xk0jk0qnjsazqgjihmpafsx3wfmxjf0-python-django-import-
> export-2.5.0.drv' failed
> $ cat /tmp/mods/django.scm
> (define-module (django)
>   #:use-module (guix)
>   #:use-module (guix build-system python)
>   #:use-module (gnu packages python)
>   #:use-module (gnu packages python-xyz)
>   #:use-module (gnu packages django)
>   #:use-module ((guix licenses) #:prefix license:))
> 
> (define-public python-tablib
>   (package
>     (name "python-tablib")
>     (version "3.0.0")
>     (source
>       (origin
>         (method url-fetch)
>         (uri (pypi-uri "tablib" version))
>         (sha256
>           (base32
>             "03f1z6jq6rf67gwhbm9ma4rydm8h447a5nh5lcs5l8jg8l4aqg7q")))
> )
>     (build-system python-build-system)
>     (home-page "https://tablib.readthedocs.io")
>     (synopsis
>       "Format agnostic tabular data library (XLS, JSON, YAML, CSV)")
>     (description
>       "Format agnostic tabular data library (XLS, JSON, YAML, CSV)")
>     (license license:expat)))
> 
> (define-public python-django-import-export
>   (package
>     (name "python-django-import-export")
>     (version "2.5.0")
>     (source
>       (origin
>         (method url-fetch)
>         (uri (pypi-uri "django-import-export" version))
>         (sha256
>           (base32
>             "0j0gsj18bkkmbn262qj2syla80vncvqn49bllwxvcgw0zhxh1763")))
> )
>     (build-system python-build-system)
>     (propagated-inputs
>       `(("python-diff-match-patch"
>          ,python-diff-match-patch)
>         ("python-django" ,python-django)
>         ("python-tablib" ,python-tablib)))
>     (home-page
>       "https://github.com/django-import-export/django-import-export")
>     (synopsis
>       "Django application and library for importing and exporting
> data with included admin integration.")
>     (description
>       "Django application and library for importing and exporting
> data with included admin integration.")
>     (license license:bsd-3)))
> 
> --8<---------------cut here---------------end--------------->8---
> 
> Here, some of tablib’s dependencies are missing; the same problem
> seems
> to happen with python-django-import-export itself.
> 
> Are we failing to parse some of the PyPI metadata?
I don't think so, rather it appears as though the requires.txt is
somehow malformed or ill-suited for importing.  It basically marks all
inputs as optional.

Perhaps we could instruct the importer to emit comments for optional
inputs like so
;; Optional inputs by section
;; -- [SECTION]
;; ("python-some-package" ,python-some-package)
;; ("python-some-other-package" ,python-some-other-package) 
Maybe add a command line switch to toggle these comments or a way of
assuming some section, e.g. [cli] to be the thing we want to build for
a package.

Regards,
Leo





Information forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Jun 2021 07:20:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 22 03:20:47 2021
Received: from localhost ([127.0.0.1]:37650 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lvaiA-00056V-EU
	for submit <at> debbugs.gnu.org; Tue, 22 Jun 2021 03:20:47 -0400
Received: from lists.gnu.org ([209.51.188.17]:48574)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1lvai5-00056L-NE
 for submit <at> debbugs.gnu.org; Tue, 22 Jun 2021 03:20:41 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57222)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1lvai5-0005Dl-Gw
 for bug-guix@HIDDEN; Tue, 22 Jun 2021 03:20:37 -0400
Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:56501)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1lvai2-0006O5-Hk
 for bug-guix@HIDDEN; Tue, 22 Jun 2021 03:20:37 -0400
IronPort-HdrOrdr: =?us-ascii?q?A9a23=3A35CWraoA+o/mPVf9GVF6S1QaV5rbeYIsimQD?=
 =?us-ascii?q?101hICG9Ffbo7vxG/c5rsyMc5wxhOk3I9erqBEDiewK6yXcW2/h1AV7KZmCPhI?=
 =?us-ascii?q?LCFuxfBOXZqQEIVxeOktJ15ONHScFFeb7NJGk/tOjCpCa5FNgt28Cd8Ke07N2/?=
 =?us-ascii?q?815dCThFUuVD4xcRMGemO3wzfSd+Qbg0BN69y6N8yQaISDAtYtu8A2UZX+7Fr8?=
 =?us-ascii?q?ba0L/vfBJuPXEawTjLsQiMgYSXLySl?=
X-IronPort-AV: E=Sophos;i="5.83,291,1616454000"; d="scan'208";a="385759224"
Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201])
 by mail3-relais-sop.national.inria.fr with
 ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jun 2021 09:20:16 +0200
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludovic.courtes@HIDDEN>
To: <bug-guix@HIDDEN>
Subject: =?utf-8?Q?=E2=80=98guix?= import =?utf-8?Q?pypi=E2=80=99?= misses
 package dependencies
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 4 Messidor an 229 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 22 Jun 2021 09:20:16 +0200
Message-ID: <877dim5psf.fsf@HIDDEN>
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
Received-SPF: pass client-ip=192.134.164.104;
 envelope-from=ludovic.courtes@HIDDEN;
 helo=mail3-relais-sop.national.inria.fr
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3,
 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-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi!

=E2=80=98guix import pypi -r django-import-export=E2=80=99 does not include=
 all the
inputs:

--8<---------------cut here---------------start------------->8---
$ guix build -L /tmp/mods python-django-import-export

[...]

starting phase `build'
running "python setup.py" with command "build" and parameters ()
Download error on https://pypi.org/simple/setuptools_scm/: [Errno -2] Name =
or service not known -- Some packages may not be found!
Download error on https://pypi.org/simple/setuptools-scm/: [Errno -2] Name =
or service not known -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.org/simple/: [Errno -2] Name or service not =
known -- Some packages may not be found!
No local packages or working download links found for setuptools_scm
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 5, in <module>
    setup(
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python=
3.8/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python=
3.8/site-packages/setuptools/__init__.py", line 139, in _install_setup_requ=
ires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python=
3.8/site-packages/setuptools/dist.py", line 716, in fetch_build_eggs
    resolved_dists =3D pkg_resources.working_set.resolve(
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python=
3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
    dist =3D best[req.key] =3D env.best_match(
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python=
3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python=
3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python=
3.8/site-packages/setuptools/dist.py", line 786, in fetch_build_egg
    return cmd.easy_install(req)
  File "/gnu/store/9w9jvy3bgjg4qaqmrij01nbppiccqr7c-python-3.8.2/lib/python=
3.8/site-packages/setuptools/command/easy_install.py", line 673, in easy_in=
stall
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for R=
equirement.parse('setuptools_scm')
command "python" "-c" "import setuptools, tokenize;__file__=3D'setup.py';f=
=3Dgetattr(tokenize, 'open', open)(__file__);code=3Df.read().replace('\\r\\=
n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build" failed =
with status 1
builder for `/gnu/store/74ph75dfy1i9hrx9n327j32ma2zv4hhd-python-tablib-3.0.=
0.drv' failed with exit code 1
build of /gnu/store/74ph75dfy1i9hrx9n327j32ma2zv4hhd-python-tablib-3.0.0.dr=
v failed
View build log at '/var/log/guix/drvs/74/ph75dfy1i9hrx9n327j32ma2zv4hhd-pyt=
hon-tablib-3.0.0.drv.bz2'.
cannot build derivation `/gnu/store/6xk0jk0qnjsazqgjihmpafsx3wfmxjf0-python=
-django-import-export-2.5.0.drv': 1 dependencies couldn't be built
guix build: error: build of `/gnu/store/6xk0jk0qnjsazqgjihmpafsx3wfmxjf0-py=
thon-django-import-export-2.5.0.drv' failed
$ cat /tmp/mods/django.scm
(define-module (django)
  #:use-module (guix)
  #:use-module (guix build-system python)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages django)
  #:use-module ((guix licenses) #:prefix license:))

(define-public python-tablib
  (package
    (name "python-tablib")
    (version "3.0.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "tablib" version))
        (sha256
          (base32
            "03f1z6jq6rf67gwhbm9ma4rydm8h447a5nh5lcs5l8jg8l4aqg7q"))))
    (build-system python-build-system)
    (home-page "https://tablib.readthedocs.io")
    (synopsis
      "Format agnostic tabular data library (XLS, JSON, YAML, CSV)")
    (description
      "Format agnostic tabular data library (XLS, JSON, YAML, CSV)")
    (license license:expat)))

(define-public python-django-import-export
  (package
    (name "python-django-import-export")
    (version "2.5.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "django-import-export" version))
        (sha256
          (base32
            "0j0gsj18bkkmbn262qj2syla80vncvqn49bllwxvcgw0zhxh1763"))))
    (build-system python-build-system)
    (propagated-inputs
      `(("python-diff-match-patch"
         ,python-diff-match-patch)
        ("python-django" ,python-django)
        ("python-tablib" ,python-tablib)))
    (home-page
      "https://github.com/django-import-export/django-import-export")
    (synopsis
      "Django application and library for importing and exporting data with=
 included admin integration.")
    (description
      "Django application and library for importing and exporting data with=
 included admin integration.")
    (license license:bsd-3)))

--8<---------------cut here---------------end--------------->8---

Here, some of tablib=E2=80=99s dependencies are missing; the same problem s=
eems
to happen with python-django-import-export itself.

Are we failing to parse some of the PyPI metadata?

Thanks,
Ludo=E2=80=99.




Acknowledgement sent to Ludovic Courtès <ludovic.courtes@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#49168; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 25 Jun 2021 15:30:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.