[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/08: Revert "gnu: python-packaging: Update to 20.4."
From: |
guix-commits |
Subject: |
08/08: Revert "gnu: python-packaging: Update to 20.4." |
Date: |
Tue, 1 Dec 2020 17:26:31 -0500 (EST) |
mbakke pushed a commit to branch master
in repository guix.
commit 04b83678653fda3c66e600e88f54f5108290ec1c
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Tue Dec 1 23:23:10 2020 +0100
Revert "gnu: python-packaging: Update to 20.4."
This reverts commit 71b15b4874b7f9ec7001d2916a8ab27dcce6cdc0.
---
gnu/local.mk | 1 +
.../patches/python-packaging-test-arch.patch | 65 ++++++++++++++++++++++
gnu/packages/python-xyz.scm | 7 ++-
3 files changed, 71 insertions(+), 2 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3a3919b..9f46ed2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1526,6 +1526,7 @@ dist_patch_DATA =
\
%D%/packages/patches/python-mox3-python3.6-compat.patch \
%D%/packages/patches/python-testtools.patch \
%D%/packages/patches/python-onnx-use-system-googletest.patch \
+ %D%/packages/patches/python-packaging-test-arch.patch \
%D%/packages/patches/python2-parameterized-docstring-test.patch \
%D%/packages/patches/python-paste-remove-timing-test.patch \
%D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \
diff --git a/gnu/packages/patches/python-packaging-test-arch.patch
b/gnu/packages/patches/python-packaging-test-arch.patch
new file mode 100644
index 0000000..df80a62
--- /dev/null
+++ b/gnu/packages/patches/python-packaging-test-arch.patch
@@ -0,0 +1,65 @@
+Fix tests that are "hard coded" to expect x86_64 output by mocking the
platform interface.
+
+Submitted upstream:
+https://github.com/pypa/packaging/pull/176
+
+diff --git a/tests/test_tags.py b/tests/test_tags.py
+index 1eacf68..0a3f1b4 100644
+--- a/tests/test_tags.py
++++ b/tests/test_tags.py
+@@ -435,37 +435,43 @@ class TestManylinuxPlatform:
+ linux_platform = list(tags._linux_platforms(is_32bit=False))
+ assert linux_platform == ["linux_x86_64"]
+
+- def test_linux_platforms_manylinux1(self, monkeypatch):
++ def test_linux_platforms_manylinux1(self, is_x86, monkeypatch):
+ monkeypatch.setattr(
+ tags, "_is_manylinux_compatible", lambda name, _: name ==
"manylinux1"
+ )
+- if platform.system() != "Linux":
++ if platform.system() != "Linux" or not is_x86:
+ monkeypatch.setattr(distutils.util, "get_platform", lambda:
"linux_x86_64")
++ monkeypatch.setattr(platform, "machine", lambda: "x86_64")
+ platforms = list(tags._linux_platforms(is_32bit=False))
+- assert platforms == ["manylinux1_x86_64", "linux_x86_64"]
++ arch = platform.machine()
++ assert platforms == ["manylinux1_" + arch, "linux_" + arch]
+
+- def test_linux_platforms_manylinux2010(self, monkeypatch):
++ def test_linux_platforms_manylinux2010(self, is_x86, monkeypatch):
+ monkeypatch.setattr(
+ tags, "_is_manylinux_compatible", lambda name, _: name ==
"manylinux2010"
+ )
+- if platform.system() != "Linux":
++ if platform.system() != "Linux" or not is_x86:
+ monkeypatch.setattr(distutils.util, "get_platform", lambda:
"linux_x86_64")
++ monkeypatch.setattr(platform, "machine", lambda: "x86_64")
+ platforms = list(tags._linux_platforms(is_32bit=False))
+- expected = ["manylinux2010_x86_64", "manylinux1_x86_64",
"linux_x86_64"]
++ arch = platform.machine()
++ expected = ["manylinux2010_" + arch, "manylinux1_" + arch, "linux_" +
arch]
+ assert platforms == expected
+
+- def test_linux_platforms_manylinux2014(self, monkeypatch):
++ def test_linux_platforms_manylinux2014(self, is_x86, monkeypatch):
+ monkeypatch.setattr(
+ tags, "_is_manylinux_compatible", lambda name, _: name ==
"manylinux2014"
+ )
+- if platform.system() != "Linux":
++ if platform.system() != "Linux" or not is_x86:
+ monkeypatch.setattr(distutils.util, "get_platform", lambda:
"linux_x86_64")
++ monkeypatch.setattr(platform, "machine", lambda: "x86_64")
+ platforms = list(tags._linux_platforms(is_32bit=False))
++ arch = platform.machine()
+ expected = [
+- "manylinux2014_x86_64",
+- "manylinux2010_x86_64",
+- "manylinux1_x86_64",
+- "linux_x86_64",
++ "manylinux2014_" + arch,
++ "manylinux2010_" + arch,
++ "manylinux1_" + arch,
++ "linux_" + arch,
+ ]
+ assert platforms == expected
+
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1086d72..bffb643 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16003,14 +16003,17 @@ several utilities, as well as an API for building
localization tools.")
(define-public python-packaging
(package
(name "python-packaging")
- (version "20.4")
+ (version "20.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "packaging" version))
+ ;; XXX: The URL in the patch file is wrong, it should be
+ ;; <https://github.com/pypa/packaging/pull/256>.
+ (patches (search-patches "python-packaging-test-arch.patch"))
(sha256
(base32
- "1y3rc1ams1i25calk6b9jf1gl85ix5a23a146swjvhdr8x7zfms3"))))
+ "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
(build-system python-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
- branch master updated (f4450e8 -> 04b8367), guix-commits, 2020/12/01
- 05/08: Revert "gnu: yelp-tools: De-propagate some inputs.", guix-commits, 2020/12/01
- 08/08: Revert "gnu: python-packaging: Update to 20.4.",
guix-commits <=
- 06/08: Revert "gnu: yelp-xsl: Enable documentation.", guix-commits, 2020/12/01
- 03/08: Revert "gnu: pixman: Update to 0.40.0.", guix-commits, 2020/12/01
- 07/08: Revert "gnu: yelp-xsl: Update to 3.36.0.", guix-commits, 2020/12/01
- 04/08: Revert "gnu: gobject-introspection: Update to 1.64.1.", guix-commits, 2020/12/01
- 02/08: Revert "gnu: pixman: Enable some features.", guix-commits, 2020/12/01
- 01/08: Revert "gnu: openjpeg: Enable tests.", guix-commits, 2020/12/01