From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Alexander Kanavin <alex@linutronix.de>
Subject: [PATCH 14/14] python3-pip: remove unneeded reproducible.patch
Date: Thu, 1 Sep 2022 09:21:25 +0200 [thread overview]
Message-ID: <20220901072125.3366367-14-alex@linutronix.de> (raw)
In-Reply-To: <20220901072125.3366367-1-alex@linutronix.de>
Since "python_pep517: use installer instead of pip" pip is no longer
used in builds, and therefore doesn't need to behave reproducibly.
I have submitted the patch upstream; upstream have suggested that the
way it had been used previously is non-reproducible by design, and
if pip is again brought into builds in the future, we should use
specific options for reproducibility:
https://github.com/pypa/pip/issues/11424
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
.../python/python3-pip/reproducible.patch | 83 -------------------
.../python/python3-pip_22.2.2.bb | 1 -
2 files changed, 84 deletions(-)
delete mode 100644 meta/recipes-devtools/python/python3-pip/reproducible.patch
diff --git a/meta/recipes-devtools/python/python3-pip/reproducible.patch b/meta/recipes-devtools/python/python3-pip/reproducible.patch
deleted file mode 100644
index 4742a8352b..0000000000
--- a/meta/recipes-devtools/python/python3-pip/reproducible.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-Pip installed wheels are not reproducible currently. The direct_url
-files encode an installation path and the installed wheels compile
-the python files at their location, not their final install location
-which is incorrect.
-
-To fix this, simply disable the direct_urls and pass the "root" to
-the python compile function to strip that path out of the compiled
-files.
-
-A version of this patch, perhaps stripping root from the direct_urls
-may be something that could be considered by upstream.
-
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-
-Upstream-Status: Submitted [https://github.com/pypa/pip/issues/11424]
-
-Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
----
- src/pip/_internal/operations/install/wheel.py | 5 ++++-
- src/pip/_internal/req/req_install.py | 5 ++++-
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/pip/_internal/operations/install/wheel.py b/src/pip/_internal/operations/install/wheel.py
-index 1af8978..3e48f9b 100644
---- a/src/pip/_internal/operations/install/wheel.py
-+++ b/src/pip/_internal/operations/install/wheel.py
-@@ -434,6 +434,7 @@ def _install_wheel(
- warn_script_location: bool = True,
- direct_url: Optional[DirectUrl] = None,
- requested: bool = False,
-+ root: str = None,
- ) -> None:
- """Install a wheel.
-
-@@ -610,7 +611,7 @@ def _install_wheel(
- with warnings.catch_warnings():
- warnings.filterwarnings("ignore")
- for path in pyc_source_file_paths():
-- success = compileall.compile_file(path, force=True, quiet=True)
-+ success = compileall.compile_file(path, force=True, quiet=True, stripdir=root)
- if success:
- pyc_path = pyc_output_path(path)
- assert os.path.exists(pyc_path)
-@@ -721,6 +722,7 @@ def install_wheel(
- warn_script_location: bool = True,
- direct_url: Optional[DirectUrl] = None,
- requested: bool = False,
-+ root: str = None,
- ) -> None:
- with ZipFile(wheel_path, allowZip64=True) as z:
- with req_error_context(req_description):
-@@ -733,4 +735,5 @@ def install_wheel(
- warn_script_location=warn_script_location,
- direct_url=direct_url,
- requested=requested,
-+ root=root,
- )
-diff --git a/src/pip/_internal/req/req_install.py b/src/pip/_internal/req/req_install.py
-index a1e376c..4c3f1bb 100644
---- a/src/pip/_internal/req/req_install.py
-+++ b/src/pip/_internal/req/req_install.py
-@@ -779,7 +779,9 @@ class InstallRequirement:
- assert self.local_file_path
- direct_url = None
- # TODO this can be refactored to direct_url = self.download_info
-- if self.editable:
-+ if '_PYTHON_SYSCONFIGDATA_NAME' in os.environ:
-+ direct_url = None
-+ elif self.editable:
- direct_url = direct_url_for_editable(self.unpacked_source_directory)
- elif self.original_link:
- direct_url = direct_url_from_link(
-@@ -796,6 +798,7 @@ class InstallRequirement:
- warn_script_location=warn_script_location,
- direct_url=direct_url,
- requested=self.user_supplied,
-+ root=root,
- )
- self.install_succeeded = True
- return
---
-2.25.1
-
diff --git a/meta/recipes-devtools/python/python3-pip_22.2.2.bb b/meta/recipes-devtools/python/python3-pip_22.2.2.bb
index 9ef6d51cf5..5b6cccf7ed 100644
--- a/meta/recipes-devtools/python/python3-pip_22.2.2.bb
+++ b/meta/recipes-devtools/python/python3-pip_22.2.2.bb
@@ -33,7 +33,6 @@ LIC_FILES_CHKSUM = "\
inherit pypi python_setuptools_build_meta
SRC_URI += "file://no_shebang_mangling.patch"
-SRC_URI += "file://reproducible.patch"
SRC_URI[sha256sum] = "3fd1929db052f056d7a998439176d3333fa1b3f6c1ad881de1885c0717608a4b"
--
2.30.2
prev parent reply other threads:[~2022-09-01 7:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 7:21 [PATCH 01/14] syslinux: mark all pending patches as Inactive-Upstream Alexander Kanavin
2022-09-01 7:21 ` [PATCH 02/14] shadow: correct the pam patch status Alexander Kanavin
2022-09-01 7:21 ` [PATCH 03/14] mtd-utils: remove patch that adds -I option Alexander Kanavin
2022-09-01 7:21 ` [PATCH 04/14] gstreamer1.0-plugins-bad: remove an unneeded patch Alexander Kanavin
2022-09-01 7:21 ` [PATCH 05/14] ghostscript: remove " Alexander Kanavin
2022-09-01 7:21 ` [PATCH 06/14] ovmf: drop the force no-stack-protector patch Alexander Kanavin
2022-09-01 7:21 ` [PATCH 07/14] python: submit CC to cc_basename patch upstream Alexander Kanavin
2022-09-01 7:21 ` [PATCH 08/14] mc: submit perl warnings " Alexander Kanavin
2022-09-01 7:21 ` [PATCH 09/14] sysvinit: send install.patch upstream Alexander Kanavin
2022-09-01 7:21 ` [PATCH 10/14] valgrind: (re)send ppc instructions patch upstream Alexander Kanavin
2022-09-01 7:21 ` [PATCH 11/14] gdk-pixbuf: submit fatal-loader.patch upstream Alexander Kanavin
2022-09-01 7:21 ` [PATCH 12/14] libsdl2: follow upstream version is even rule Alexander Kanavin
2022-09-01 7:21 ` [PATCH 13/14] python3-pip: submit reproducible.patch upstream Alexander Kanavin
2022-09-01 7:21 ` Alexander Kanavin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220901072125.3366367-14-alex@linutronix.de \
--to=alex.kanavin@gmail.com \
--cc=alex@linutronix.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox