GNU bug report logs - #52836
"guix import pypi" fails with "Failed to extract file from wheel" and "no requires.txt file found"

Previous Next

Package: guix;

Reported by: bbb ee <blasforr <at> gmail.com>

Date: Mon, 27 Dec 2021 23:54:02 UTC

Severity: normal

Done: zimoun <zimon.toutoune <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52836 in the body.
You can then email your comments to 52836 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#52836; Package guix. (Mon, 27 Dec 2021 23:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to bbb ee <blasforr <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 27 Dec 2021 23:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: bbb ee <blasforr <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: "guix import pypi" fails with "Failed to extract file from wheel" and
 "no requires.txt file found"
Date: Mon, 27 Dec 2021 22:10:32 +0100
[Message part 1 (text/plain, inline)]
Hello,
I have encounter a issue with "guix import pypi" :
```
guix import: warning: Failed to extract file:
PyPortfolioOpt-1.5.1.dist-info/METADATA from wheel.
guix import: warning: Cannot guess requirements from source archive: no
requires.txt file found.
```
## reproduce the bug

```
(base) guix import pypi  PyPortfolioOpt
following redirection to `https://pypi.org/pypi/pyportfolioopt/json'...

Starting download of /tmp/guix-file.mwZdLg
From
https://files.pythonhosted.org/packages/97/c2/c7569f2773f3e942367e90dcca15a235af3d3330ac8abfcbfbe67a8ba8dd/PyPortfolioOpt-1.5.1.tar.gz.
..
 …t-1.5.1.tar.gz  56KiB               2.7MiB/s 00:00 [##################]
100.0%

Starting download of /tmp/guix-file.mHBgak
From
https://files.pythonhosted.org/packages/90/98/3906835b783ba39cfc613c7b0c0fde9c758c729ff3406d45f1c2a1116961/PyPortfolioOpt-1.5.1-py3-none-any.whl.
..
 ….1-py3-none-any.whl  60KiB          2.1MiB/s 00:00 [##################]
100.0%
guix import: warning: Failed to extract file:
PyPortfolioOpt-1.5.1.dist-info/METADATA from wheel.
guix import: warning: Cannot guess requirements from source archive: no
requires.txt file found.
(package
  (name "python-pyportfolioopt")
  (version "1.5.1")
  (source
    (origin
      (method url-fetch)
      (uri (pypi-uri "pyportfolioopt" version))
      (sha256
        (base32 "162d6jyvba0xk2blssbp52rrjqpjv011h988k150p1fg7x7nzbs9"))))
  (build-system python-build-system)
  (home-page "https://github.com/robertmartin8/PyPortfolioOpt")
  (synopsis "Financial portfolio optimization in python")
  (description "Financial portfolio optimization in python")
  (license license:expat))
(base) guix describe
Generation 220 Dec 27 2021 12:01:04 (current)
  guix 9bbbac6
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 9bbbac6783bcdace17d967e85c8ae8d14cbf1ef9
```
## additional information
This user has encountered a similar issue for "guix import pypi httpie"
https://www.mail-archive.com/bug-guix <at> gnu.org/msg14277.html

However "guix import pypi httpie" runs for my version of guix.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#52836; Package guix. (Wed, 29 Dec 2021 17:10:01 GMT) Full text and rfc822 format available.

Message #8 received at 52836 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: bbb ee <blasforr <at> gmail.com>, 52836 <at> debbugs.gnu.org
Subject: Re: bug#52836: "guix import pypi" fails with "Failed to extract
 file from wheel" and "no requires.txt file found"
Date: Wed, 29 Dec 2021 18:03:59 +0100
Hi,

On Mon, 27 Dec 2021 at 22:10, bbb ee <blasforr <at> gmail.com> wrote:

> ```
> guix import: warning: Failed to extract file:
> PyPortfolioOpt-1.5.1.dist-info/METADATA from wheel.
> guix import: warning: Cannot guess requirements from source archive: no
> requires.txt file found.
> ```

Is it a bug on Guix side or upstream?  Because it seems that upstream
does not provide metadata information, at least, as usually expected.

Well, I have not yet inspected the PyPI package but it seems possible
that it is incorrectly packaged with the Setuptools standard.


> ## additional information
> This user has encountered a similar issue for "guix import pypi httpie"
> https://www.mail-archive.com/bug-guix <at> gnu.org/msg14277.html
>
> However "guix import pypi httpie" runs for my version of guix.

Well, “guix import pypi httpie” works for me.


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#52836; Package guix. (Fri, 31 Dec 2021 11:01:01 GMT) Full text and rfc822 format available.

Message #11 received at 52836 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: bbb ee <blasforr <at> gmail.com>
Cc: 52836 <at> debbugs.gnu.org
Subject: Re: bug#52836: "guix import pypi" fails with "Failed to extract file
 from wheel" and "no requires.txt file found"
Date: Fri, 31 Dec 2021 12:00:33 +0100
Hi,

On Fri, 31 Dec 2021 at 11:15, bbb ee <blasforr <at> gmail.com> wrote:

> > Is it a bug on Guix side or upstream?  Because it seems that upstream
> > does not provide metadata information, at least, as usually expected.
>
> `pip install PyPortfolioOpt`, `poetry add PyPortfolioOpt` runs for me. If other python package installer can run, I suppose the upstream is correct.

Hum, not necessary.  Well, I do not think that 'pip' uses all the
metadata from PyPI to install.  'pip' does dirty things and yes it
just works :-)  But this does not imply that PyPortfolioOpt is
correctly packaged as it is defined by PyPI standards.  I do not know
'poetry'.

Anyway. :-)  I am not finding the PEP defining the Python packaging
and the structure for a PyPI package.  Because it is not clear for me
if it is a bug on Guix side or upstream.


Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#52836; Package guix. (Fri, 31 Dec 2021 12:17:03 GMT) Full text and rfc822 format available.

Message #14 received at 52836 <at> debbugs.gnu.org (full text, mbox):

From: bbb ee <blasforr <at> gmail.com>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 52836 <at> debbugs.gnu.org
Subject: Re: bug#52836: "guix import pypi" fails with "Failed to extract file
 from wheel" and "no requires.txt file found"
Date: Fri, 31 Dec 2021 11:15:09 +0100
[Message part 1 (text/plain, inline)]
> Is it a bug on Guix side or upstream?  Because it seems that upstream
> does not provide metadata information, at least, as usually expected.

`pip install PyPortfolioOpt`, `poetry add PyPortfolioOpt` runs for me. If
other python package installer can run, I suppose the upstream is correct.
Unless Guix is not as powerful as other python package installers, and
cannot work for certain type of PyPi packages. In this case, can this be
considered an improvement to be made?

Le mer. 29 déc. 2021 à 18:09, zimoun <zimon.toutoune <at> gmail.com> a écrit :

> Hi,
>
> On Mon, 27 Dec 2021 at 22:10, bbb ee <blasforr <at> gmail.com> wrote:
>
> > ```
> > guix import: warning: Failed to extract file:
> > PyPortfolioOpt-1.5.1.dist-info/METADATA from wheel.
> > guix import: warning: Cannot guess requirements from source archive: no
> > requires.txt file found.
> > ```
>
> Is it a bug on Guix side or upstream?  Because it seems that upstream
> does not provide metadata information, at least, as usually expected.
>
> Well, I have not yet inspected the PyPI package but it seems possible
> that it is incorrectly packaged with the Setuptools standard.
>
>
> > ## additional information
> > This user has encountered a similar issue for "guix import pypi httpie"
> > https://www.mail-archive.com/bug-guix <at> gnu.org/msg14277.html
> >
> > However "guix import pypi httpie" runs for my version of guix.
>
> Well, “guix import pypi httpie” works for me.
>
>
> Cheers,
> simon
>
[Message part 2 (text/html, inline)]

Reply sent to zimoun <zimon.toutoune <at> gmail.com>:
You have taken responsibility. (Tue, 08 Mar 2022 10:23:04 GMT) Full text and rfc822 format available.

Notification sent to bbb ee <blasforr <at> gmail.com>:
bug acknowledged by developer. (Tue, 08 Mar 2022 10:23:04 GMT) Full text and rfc822 format available.

Message #19 received at 52836-done <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: bbb ee <blasforr <at> gmail.com>
Cc: 52836-done <at> debbugs.gnu.org
Subject: Re: bug#52836: "guix import pypi" fails with "Failed to extract
 file from wheel" and "no requires.txt file found"
Date: Tue, 08 Mar 2022 11:14:44 +0100
Hi,

On ven., 31 déc. 2021 at 12:00, zimoun <zimon.toutoune <at> gmail.com> wrote:
> On Fri, 31 Dec 2021 at 11:15, bbb ee <blasforr <at> gmail.com> wrote:
>
>> > Is it a bug on Guix side or upstream?  Because it seems that upstream
>> > does not provide metadata information, at least, as usually expected.
>>
>> `pip install PyPortfolioOpt`, `poetry add PyPortfolioOpt` runs for me. If other python package installer can run, I suppose the upstream is correct.
>
> Hum, not necessary.  Well, I do not think that 'pip' uses all the
> metadata from PyPI to install.  'pip' does dirty things and yes it
> just works :-)  But this does not imply that PyPortfolioOpt is
> correctly packaged as it is defined by PyPI standards.  I do not know
> 'poetry'.
>
> Anyway. :-)  I am not finding the PEP defining the Python packaging
> and the structure for a PyPI package.  Because it is not clear for me
> if it is a bug on Guix side or upstream.

This package PyPortfolioOpt is badly packaged upstream.  We cannot do
better than warn about the issue:

--8<---------------cut here---------------start------------->8---
$ guix import pypi  PyPortfolioOpt
following redirection to `https://pypi.org/pypi/pyportfolioopt/json'...

Starting download of /tmp/guix-file.6rSGsS
From https://files.pythonhosted.org/packages/97/c2/c7569f2773f3e942367e90dcca15a235af3d3330ac8abfcbfbe67a8ba8dd/PyPortfolioOpt-1.5.1.tar.gz...
 …t-1.5.1.tar.gz  56KiB               8.2MiB/s 00:00 [##################] 100.0%

Starting download of /tmp/guix-file.MFmUSK
From https://files.pythonhosted.org/packages/90/98/3906835b783ba39cfc613c7b0c0fde9c758c729ff3406d45f1c2a1116961/PyPortfolioOpt-1.5.1-py3-none-any.whl...
 ….1-py3-none-any.whl  60KiB         45.2MiB/s 00:00 [##################] 100.0%
guix import: warning: Failed to extract file: PyPortfolioOpt-1.5.1.dist-info/METADATA from wheel.
guix import: warning: Cannot guess requirements from source archive: no requires.txt file found.
guix import: warning: project name pyportfolioopt does not appear verbatim in the PyPI URI
hint: The PyPI URI is:
`https://files.pythonhosted.org/packages/97/c2/c7569f2773f3e942367e90dcca15
a235af3d3330ac8abfcbfbe67a8ba8dd/PyPortfolioOpt-1.5.1.tar.gz'.  You should
review the pypi-uri declaration in the generated package.  You may need to
replace "pyportfolioopt" with a substring of the PyPI URI that identifies
the package.

(package
  (name "python-pyportfolioopt")
  (version "1.5.1")
  (source
    (origin
      (method url-fetch)
      (uri (pypi-uri "pyportfolioopt" version))
      (sha256
        (base32 "162d6jyvba0xk2blssbp52rrjqpjv011h988k150p1fg7x7nzbs9"))))
  (build-system python-build-system)
  (home-page "https://github.com/robertmartin8/PyPortfolioOpt")
  (synopsis "Financial portfolio optimization in python")
  (description "Financial portfolio optimization in python")
  (license license:expat))
--8<---------------cut here---------------end--------------->8---


Therefore, I am closing.  Feel free to reopen if I missed a point.


Cheers,
simon




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Apr 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 15 days ago.

Previous Next


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