Closed DavHau closed 4 years ago
$ pip download --no-binary :all: zipp==2.0.0
Collecting zipp==2.0.0
Downloading zipp-2.0.0.tar.gz (12 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
WARNING: Requested zipp==2.0.0 from https://files.pythonhosted.org/packages/ee/f7/6c3ca4764a8025da9422825c2bc367fdc8dd115ebb52e4ef057f234938c4/zipp-2.0.0.tar.gz#sha256=7ae5ccaca427bafa9760ac3cd8f8c244bfc259794b5b6bb9db4dda2241575d09, but installing version 0.0.0
Saved ./zipp-2.0.0.tar.gz
Collecting more-itertools
Downloading more-itertools-8.1.0.tar.gz (78 kB)
|████████████████████████████████| 78 kB 1.3 MB/s
Saved ./more-itertools-8.1.0.tar.gz
Successfully downloaded zipp more-itertools
This is not a pypi2nix issue but an issue with zipp and/or pip, but most likely only zipp. It looks like they forgot to set the version option in their setup.cfg
file.
@DavHau I submitted a PR to zipp that should fix the issue with their next release.
See here: https://github.com/jaraco/zipp/pull/30
Thank you very much for that! Very much appreciated!
But shouldn't we assume that this could be the case with many other libraries. And why does the installation work with pip but not with pypi2nix? Wouldn't it be best for pypi2nix to behave like pip as much as possible? Otherwise we will run again into this problem in the future. EDIT: I assume pypi2nix takes the version specified within the package to lookup it's metadata. Maybe this information should not be trusted and there is a better way? Maybe we just take the version number we were requesting in the first place?
I'd argue that it is better that pypi2nix crashed since it let to a PR that fixed a bug in a widely used package.
I get it. Using unreliable software is frustrating and I see the point in your comment but unfortunately we have to detect the version of packages. Currently I would not know how to find out the version of a distribution other than querying its PKG-INFO. Of course there is one other version and that is to parse the stdout
of pip
but frankly I think that this would cause more instability since these kinds of things tend to change.
Also consider that you usually cannot tell which version number "we were requesting in the first place", since most people have requirements like these: zipp>=1.0
or zipp==2.0.*
.
pypi2nix version: 2.0.3 Command:
pypi2nix -e zipp==2.0.0
While downloading the requirements there is a strange warning:
WARNING: Requested zipp==2.0.0
..., but installing version 0.0.0
Afterwards it fails while trying to fetch metadata for zipp==0.0.0.Full log: