forked from mirrors/nixpkgs
python3.pkgs.pip: 20.1.1 -> 20.2.4
Reproducible builds of pyproject projects using pip is resolved. Fixes https://github.com/pypa/pip/issues/7808 Fixes https://github.com/NixOS/nixpkgs/issues/81441 The more recentc409f69480
caused trouble with pyproject troubles and had to be reverted anyway. https://github.com/NixOS/nixpkgs/pull/102222#issuecomment-722380794 Revert "pythonPackages.pip: make reproducible (#102222)" This reverts commitc409f69480
. Revert "python3Packages.pip: allow setting reproducible temporary directory via NIX_PIP_INSTALL_TMPDIR" This reverts commitaedbade43e
.
This commit is contained in:
parent
a821be7531
commit
61a04f735a
|
@ -11,9 +11,7 @@ pipInstallPhase() {
|
|||
export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH"
|
||||
|
||||
pushd dist || return 1
|
||||
mkdir tmpbuild
|
||||
@pythonInterpreter@ -m pip install ./*.whl --no-index --prefix="$out" --no-cache $pipInstallFlags
|
||||
rm -rf tmpbuild
|
||||
@pythonInterpreter@ -m pip install ./*.whl --no-index --prefix="$out" --no-cache $pipInstallFlags --build tmpbuild
|
||||
popd || return 1
|
||||
|
||||
runHook postInstall
|
||||
|
|
|
@ -23,11 +23,6 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
postPatch = ''
|
||||
# Apply the pip reproducible patch
|
||||
pushd "${pip.src.name}"
|
||||
patch -p1 < ${../pip/reproducible.patch}
|
||||
popd
|
||||
|
||||
mkdir -p $out/bin
|
||||
'';
|
||||
|
||||
|
|
|
@ -14,21 +14,17 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pip";
|
||||
version = "20.1.1";
|
||||
version = "20.2.4";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pypa";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "01wq01ysv0ijcrg8a4mj72zb8al15b8vw8g3ywhxq53kbsyhfxn4";
|
||||
sha256 = "eMVV4ftgV71HLQsSeaOchYlfaJVgzNrwUynn3SA1/Do=";
|
||||
name = "${pname}-${version}-source";
|
||||
};
|
||||
|
||||
# Remove when solved https://github.com/NixOS/nixpkgs/issues/81441
|
||||
# See also https://github.com/pypa/pip/issues/7808
|
||||
patches = [ ./reproducible.patch ];
|
||||
|
||||
nativeBuildInputs = [ bootstrapped-pip ];
|
||||
|
||||
# pip detects that we already have bootstrapped_pip "installed", so we need
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
diff --git a/src/pip/_internal/utils/temp_dir.py b/src/pip/_internal/utils/temp_dir.py
|
||||
index 201ba6d98..f1569fecd 100644
|
||||
--- a/src/pip/_internal/utils/temp_dir.py
|
||||
+++ b/src/pip/_internal/utils/temp_dir.py
|
||||
@@ -3,6 +3,7 @@ from __future__ import absolute_import
|
||||
import errno
|
||||
import itertools
|
||||
import logging
|
||||
+import os
|
||||
import os.path
|
||||
import tempfile
|
||||
from contextlib import contextmanager
|
||||
@@ -181,6 +182,11 @@ class TempDirectory(object):
|
||||
# symlinked to another directory. This tends to confuse build
|
||||
# scripts, so we canonicalize the path by traversing potential
|
||||
# symlinks here.
|
||||
+ if "SOURCE_DATE_EPOCH" in os.environ:
|
||||
+ path = os.path.join(tempfile.gettempdir(), "pip-{}-immobile".format(kind))
|
||||
+ os.mkdir(path)
|
||||
+ return path
|
||||
+
|
||||
path = os.path.realpath(
|
||||
tempfile.mkdtemp(prefix="pip-{}-".format(kind))
|
||||
)
|
||||
|
Loading…
Reference in a new issue