]> code.ossystems Code Review - openembedded-core.git/commitdiff
python3-setuptools: upgrade 56.2.0 -> 57.0.0
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 May 2021 08:39:23 +0000 (08:39 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Jun 2021 13:03:27 +0000 (14:03 +0100)
Add a patch to fix a reproducibility issue in the new version.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/files/0001-conditionally-do-not-fetch-code-by-easy_install.patch
meta/recipes-devtools/python/python3-setuptools/reproducibility.patch [new file with mode: 0644]
meta/recipes-devtools/python/python3-setuptools_57.0.0.bb [moved from meta/recipes-devtools/python/python3-setuptools_56.2.0.bb with 88% similarity]

index 59e278d1aeddc41937d6039424e70febac06dfbc..1082fe79be3755b82261a2524ec7477fc3b71d4a 100644 (file)
@@ -1,4 +1,4 @@
-From d6339e6b3de0f3be5ca50541d82f99d827700f45 Mon Sep 17 00:00:00 2001
+From f6afc18e08a6c428ce8becd114c535a6840f1b9f Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <hongxu.jia@windriver.com>
 Date: Tue, 17 Jul 2018 10:13:38 +0800
 Subject: [PATCH] conditionally do not fetch code by easy_install
diff --git a/meta/recipes-devtools/python/python3-setuptools/reproducibility.patch b/meta/recipes-devtools/python/python3-setuptools/reproducibility.patch
new file mode 100644 (file)
index 0000000..149d8ad
--- /dev/null
@@ -0,0 +1,40 @@
+The License-File lines in PKG-INFO change ordering depending on the order on disk, 
+for example for python-packaging, one build shows:
+
+License-File: LICENSE
+License-File: LICENSE.APACHE
+License-File: LICENSE.BSD
+
+and the other shows:
+
+License-File: LICENSE
+License-File: LICENSE.BSD
+License-File: LICENSE.APACHE
+
+This is because glob uses os.listdir() which is unsorted. Sort the result to avoid this.
+
+Upstream-Status: Submitted [https://github.com/pypa/setuptools/issues/2691]
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Index: setuptools-57.0.0/setuptools/dist.py
+===================================================================
+--- setuptools-57.0.0.orig/setuptools/dist.py
++++ setuptools-57.0.0/setuptools/dist.py
+@@ -15,7 +15,7 @@ import distutils.command
+ from distutils.util import strtobool
+ from distutils.debug import DEBUG
+ from distutils.fancy_getopt import translate_longopt
+-from glob import iglob
++from glob import glob
+ import itertools
+ import textwrap
+ from typing import List, Optional, TYPE_CHECKING
+@@ -603,7 +603,7 @@ class Distribution(_Distribution):
+         return (
+             path
+             for pattern in patterns
+-            for path in iglob(pattern)
++            for path in sorted(glob(pattern))
+             if not path.endswith('~')
+             and os.path.isfile(path)
+         )
similarity index 88%
rename from meta/recipes-devtools/python/python3-setuptools_56.2.0.bb
rename to meta/recipes-devtools/python/python3-setuptools_57.0.0.bb
index bb852d065222063b7e69e0b8f80691ccd0a7e7e6..a15b51e31c60dbe3b6ecc7ee1a68af758e539c17 100644 (file)
@@ -8,9 +8,10 @@ inherit pypi setuptools3
 
 SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
 
-SRC_URI += "file://0001-change-shebang-to-python3.patch"
+SRC_URI += "file://0001-change-shebang-to-python3.patch \
+            file://reproducibility.patch"
 
-SRC_URI[sha256sum] = "7bb5652625e94e73b9358b7ed8c6431b732e80cf31f4e0972294c64f0e5b849e"
+SRC_URI[sha256sum] = "401cbf33a7bf817d08014d51560fc003b895c4cdc1a5b521ad2969e928a07535"
 
 DEPENDS += "${PYTHON_PN}"