unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: "Ludovic Courtès" <ludo@gnu.org>,
	"Maxim Cournoyer" <maxim.cournoyer@gmail.com>
Cc: 49168@debbugs.gnu.org
Subject: bug#49168: ‘guix import pypi’ misses package dependencies
Date: Fri, 25 Jun 2021 17:25:48 +0200	[thread overview]
Message-ID: <18276660c96637b7a17db80ca0712f2ea308aa2d.camel@student.tugraz.at> (raw)
In-Reply-To: <87mtre2e1e.fsf@gnu.org>

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





  reply	other threads:[~2021-06-25 15:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22  7:20 bug#49168: ‘guix import pypi’ misses package dependencies Ludovic Courtès
2021-06-22  8:34 ` Leo Prikler
2021-06-22 12:33   ` Ludovic Courtès
2021-06-22 12:37     ` Leo Prikler
2021-06-22 19:01       ` Maxim Cournoyer
2021-06-23 13:20       ` Ludovic Courtès
2021-06-23 14:17         ` Leo Prikler
2021-06-24  9:57           ` Ludovic Courtès
2021-06-24 19:04             ` Maxim Cournoyer
2021-06-25 14:51               ` Ludovic Courtès
2021-06-25 15:25                 ` Leo Prikler [this message]
2021-06-25 16:39                 ` Maxim Cournoyer
2021-06-28  9:39                   ` Ludovic Courtès
2022-03-08  9:28                     ` zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18276660c96637b7a17db80ca0712f2ea308aa2d.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=49168@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).