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 recentwip/yesmanc409f69480
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
.
parent
a821be7531
commit
61a04f735a
@ -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 new issue