Python: setuptools/wheel/pip now bootstrap from source

Since wheel support was introduced in 2015 we always relied on pre-built
wheels for bootstrapping. Now, we can bootstrap directly from the
sources of these packages in git.

The `bootstrapped-pip` packages is used to build `pip`, `setuptools` and `wheel`,
after which those packages are used to build everything else.

Note that when building `bootstrapped-pip` some errors are shown.
These are not important, the build actually does succeed and work as intended.
This commit is contained in:
Frederik Rietdijk
2019-10-20 15:33:35 +02:00
committed by Frederik Rietdijk
parent 1fca2ab52d
commit 56727dc1ff
4 changed files with 79 additions and 55 deletions

View File

@@ -2,7 +2,7 @@
, python
, buildPythonPackage
, bootstrapped-pip
, fetchPypi
, fetchFromGitHub
, mock
, scripttest
, virtualenv
@@ -17,9 +17,12 @@ buildPythonPackage rec {
version = "19.3.1";
format = "other";
src = fetchPypi {
inherit pname version;
sha256 = "21207d76c1031e517668898a6b46a9fb1501c7a4710ef5dfd6a40ad9e6757ea7";
src = fetchFromGitHub {
owner = "pypa";
repo = pname;
rev = version;
sha256 = "079gz0v37ah1l4i5iwyfb0d3mni422yv5ynnxa0wcqpnvkc7sfnw";
name = "${pname}-${version}-source";
};
nativeBuildInputs = [ bootstrapped-pip ];
@@ -34,7 +37,7 @@ buildPythonPackage rec {
meta = {
description = "The PyPA recommended tool for installing Python packages";
license = lib.licenses.mit;
license = with lib.licenses; [ mit ];
homepage = https://pip.pypa.io/;
priority = 10;
};