‘guix import pypi’ fails in the absence of “sdist” releases

  • Done
  • quality assurance status badge
Details
4 participants
  • Leo Prikler
  • Ludovic Courtès
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 18 Jun 2021 09:33
(address . bug-guix@gnu.org)
87czsjmxty.fsf@inria.fr
Hi,

For some packages we get this:

Toggle snippet (4 lines)
$ guix import pypi jaxlib
guix import: error: no source release for pypi package jaxlib 0.1.67

and indeed, there’s no “sdist” (source distribution), only
“bdist_wheel” (.whl files).

Nevertheless, should the importer do something smarter here? The
metadata at https://pypi.org/pypi/jaxlib/json doesn’t contain info
about the source repository (though it contains the home page at
github.com). Would it make sense to build from a .whl file or does this
necessarily include generated code and other byproducts?

Thanks,
Ludo’.
L
L
Leo Prikler wrote on 18 Jun 2021 10:56
(address . 49083@debbugs.gnu.org)(address . ludo@gnu.org)
ccf3451dbe51719d00e96027f48aee7729a22fad.camel@student.tugraz.at
Wheels are (as far as I understand) binary distributions, so they ought
to contain everything, that gets put into site-packages. I don't think
they make for good source packages. In particular, the jaxlib wheel
contains a bunch of shared objects and almost none of the source that
one can see on Github.

Instead of erroring out, we could try to check whether the homepage
points to a git forge and try to generate a git-reference from that.
Failing this, we might want to set source to something, that produces
an error when read or when used as a variable, similar to how unknown
licenses are handled.

Regards,
Leo
L
L
Ludovic Courtès wrote on 20 Jun 2021 23:03
(name . Leo Prikler)(address . leo.prikler@student.tugraz.at)(address . 49083@debbugs.gnu.org)
87o8c08d07.fsf@gnu.org
Hi,

Leo Prikler <leo.prikler@student.tugraz.at> skribis:

Toggle quote (6 lines)
> Wheels are (as far as I understand) binary distributions, so they ought
> to contain everything, that gets put into site-packages. I don't think
> they make for good source packages. In particular, the jaxlib wheel
> contains a bunch of shared objects and almost none of the source that
> one can see on Github.

Uh, worse than I thought.

Toggle quote (3 lines)
> Instead of erroring out, we could try to check whether the homepage
> points to a git forge and try to generate a git-reference from that.

Sounds good. I suspect special-casing github.com would already catch
most cases… Problem is that we would not know which tag to use, unless
we go to great lengths to guess that.

Toggle quote (4 lines)
> Failing this, we might want to set source to something, that produces
> an error when read or when used as a variable, similar to how unknown
> licenses are handled.

Right; not failing seems preferable.

Thanks,
Ludo’.
M
M
Maxim Cournoyer wrote on 22 Jun 2021 20:58
Re: bug#49083: ‘guix import pypi ’ fails in the absence of “sdist” releases
(name . Ludovic Courtès)(address . ludo@gnu.org)
87a6nh3ew3.fsf@gmail.com
Hi,

Ludovic Courtès <ludo@gnu.org> writes:


[...]

Toggle quote (6 lines)
>> Failing this, we might want to set source to something, that produces
>> an error when read or when used as a variable, similar to how unknown
>> licenses are handled.
>
> Right; not failing seems preferable.

That seems to be the most actionable thing to do. It'd help when
importing recursively; the whole collections could still be imported
fully (although requiring manual intervention) instead of erroring-out
half-way.

Maxim
L
L
Ludovic Courtès wrote on 2 Feb 2022 18:46
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87r18lqhyu.fsf@gnu.org
Hi!

So for now I “fixed” it by displaying a hint in commit
00762a4c4c8ecdd71cccf6afdd87ae68bf9b4964.

Toggle snippet (8 lines)
$ ./pre-inst-env guix import pypi jaxlib
guix import: error: no source release for pypi package jaxlib 0.1.76

hint: This indicates that the package is available on PyPI, but only as a "wheel" containing
binaries, not source. To build it from source, refer to the upstream repository at
`https://github.com/google/jax'.

Ludo’.
Closed
M
M
Maxim Cournoyer wrote on 2 Feb 2022 22:45
(name . Ludovic Courtès)(address . ludo@gnu.org)
87iltxx7rd.fsf@gmail.com
Hi,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (12 lines)
> Hi!
>
> So for now I “fixed” it by displaying a hint in commit
> 00762a4c4c8ecdd71cccf6afdd87ae68bf9b4964.
>
> $ ./pre-inst-env guix import pypi jaxlib
> guix import: error: no source release for pypi package jaxlib 0.1.76
>
> hint: This indicates that the package is available on PyPI, but only as a "wheel" containing
> binaries, not source. To build it from source, refer to the upstream repository at
> `https://github.com/google/jax'.

That's much clearer, thanks!

Maxim
Closed
?