Semi-automatic replacement fetchPyPi with fetchFromGitHub#150251
Semi-automatic replacement fetchPyPi with fetchFromGitHub#150251KAction wants to merge 302 commits intoNixOS:stagingfrom
Conversation
| src = fetchFromGitHub { | ||
| owner = "autocracy"; | ||
| repo = "python-ipy"; | ||
| rev = "IPy-1.01"; |
There was a problem hiding this comment.
I don't maintain Python stuff in Nixpkgs so cannot properly review this PR.
But... maybe the following way is more preferred? (and same for other packages)
| rev = "IPy-1.01"; | |
| rev = "IPy-${version}"; |
There was a problem hiding this comment.
You are absolutely right. It will be harder to do it automatically, though.
I'll see what I can do
|
I'm opposed to this change. PyPi is the primary way to distribute python packages and holds the release tarballs intended for use in packaging. Release Tarballs and version control repositories can differ and we prefer the proper release tarballs in nixpkgs where they exist. We already do use the GitHub download when tests are missing, but as package-specific workarounds. |
|
I convinced many upstream projects to provide release archives, sometimes even signed ones, during my days in Debian, but now I will disagree that release archives should be primary distribution means. Let us consider common case of project that uses public git as version control, tags for release and also provides release archive, like GNU Hello. So what are reasons to prefer maintainer-provided release archive to auto-generated git archive, or via versa?
In summary, in world dominated by public git, maintainer releases are useless at best. |
|
FYI there was a discussion around this before in #142236.
I'm not sure I follow, why is someone "not doing their job properly" when using an existing
I'd argue that if a repository is important enough to be watched by "thousands of eyes", there are also people checking release tarballs. Regarding the approach here, I'd suggest to discuss this in an issue first before opening such a large PR for two reasons:
|
Yes, I see. It was discussed previously. Mostly the same arguments, but unfortunately ended with nothing.
For same reasons as using upstream-provided binary is bad, building from the source is good. Attack surface, readiness for patching, etc. Was discussed in issue you mentioned.
You clearly have difference experience from mine. I do review git-diff for some of my dependencies, but I do it using "git log v1.0..v2.0". If distribution uses release archives, and they have differences no present in git, I would be fooled.
Making it in one PR is going to be hard anyway, since not all packages have git URL in machine-readable format, but yes, you are right, let's try to get RFC first. Actually, I was quite surprised that this idea met any opposition. |
This is a no-go for me until we have rev mentioning the version. And this also doesn't take into account that some packages have more involved processes as part of the sdist, such as doing a node build. |
You mean |
|
Apart from the comments from @sternenseemann, which I fully agree with and is reason enough to close this PR there was also the comment from @jonringer:
Which made me think.. There is no way you actually tested this change. This change is sweeping and without much regard for the fallout. |
It is common for python packages to contain reduced set of files in pypi
upload, with tests and documentation omited. It makes some sense, since it
reduce amount of data downloaded by "pip install", which only cares about
executable code.
Hence, for nixpkgs it makes sense to use version control system instead. This
pull request converts subset of python packages from fetchPyPi to fetchGitHub.
It does not change any functionality.
Only packages for which I could have figured out git repository automatically,
were changed. Every package changed in this pull request was succesfully built
before and after on my machine.