[arch-commits] Commit in python-packaging/repos/extra-any (4 files)

Antonio Rojas arojas at gemini.archlinux.org
Wed Dec 15 08:43:06 UTC 2021


    Date: Wednesday, December 15, 2021 @ 08:43:06
  Author: arojas
Revision: 432547

archrelease: copy trunk to extra-any

Added:
  python-packaging/repos/extra-any/PKGBUILD
    (from rev 432546, python-packaging/trunk/PKGBUILD)
  python-packaging/repos/extra-any/replace-distutils-usage-with-sysconfig.patch
    (from rev 432546, python-packaging/trunk/replace-distutils-usage-with-sysconfig.patch)
Deleted:
  python-packaging/repos/extra-any/PKGBUILD
  python-packaging/repos/extra-any/replace-distutils-usage-with-sysconfig.patch

----------------------------------------------+
 PKGBUILD                                     |   93 ++---
 replace-distutils-usage-with-sysconfig.patch |  392 ++++++++++++-------------
 2 files changed, 242 insertions(+), 243 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-15 08:42:56 UTC (rev 432546)
+++ PKGBUILD	2021-12-15 08:43:06 UTC (rev 432547)
@@ -1,47 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=python-packaging
-pkgname=(python-packaging python2-packaging)
-pkgver=20.9
-pkgrel=6
-pkgdesc="Core utilities for Python packages"
-arch=('any')
-url="https://github.com/pypa/packaging"
-license=('Apache')
-makedepends=('python-setuptools' 'python2-setuptools' 'python-pyparsing' 'python2-pyparsing')
-checkdepends=('python-pytest' 'python2-pytest' 'python-pretend' 'python2-pretend')
-source=("https://github.com/pypa/packaging/archive/$pkgver/$pkgbase-$pkgver.tar.gz"
-        replace-distutils-usage-with-sysconfig.patch)
-sha512sums=('fb71f1036cfaacbe94fdee663af31d6ad1960f73ecc95cba87b461c2d7d2ea90085853bb4682b146492d8c48f784b60ef082e3b1259269857166b143cd9a920b'
-            '015ddcb799259190e3a4b97d386fb8e4cb6f76a22eed2ce97babf10116e886b82f6f3e3e74e3590dd14a8fce8e6ca5980a91205c61e29afa5dbdc387f4daa8dd')
-
-prepare() {
-  cd packaging-$pkgver
-  patch -Np1 -i ../replace-distutils-usage-with-sysconfig.patch
-}
-
-build() {
-  cd packaging-$pkgver
-  python setup.py build
-  python2 setup.py build
-}
-
-check() {
-  cd packaging-$pkgver
-  python -m pytest
-  python2 -m pytest
-}
-
-package_python-packaging() {
-  depends=('python-pyparsing' 'python-six')
-
-  cd packaging-$pkgver
-  python setup.py install --root "$pkgdir"
-}
-
-package_python2-packaging() {
-  depends=('python2-pyparsing' 'python2-six')
-
-  cd packaging-$pkgver
-  python2 setup.py install --root "$pkgdir"
-}

Copied: python-packaging/repos/extra-any/PKGBUILD (from rev 432546, python-packaging/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-12-15 08:43:06 UTC (rev 432547)
@@ -0,0 +1,46 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-packaging
+pkgname=(python-packaging python2-packaging)
+pkgver=20.9
+pkgrel=7
+pkgdesc="Core utilities for Python packages"
+arch=('any')
+url="https://github.com/pypa/packaging"
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pyparsing' 'python2-pyparsing')
+checkdepends=('python-pytest' 'python-pretend')
+source=("https://github.com/pypa/packaging/archive/$pkgver/$pkgbase-$pkgver.tar.gz"
+        replace-distutils-usage-with-sysconfig.patch)
+sha512sums=('fb71f1036cfaacbe94fdee663af31d6ad1960f73ecc95cba87b461c2d7d2ea90085853bb4682b146492d8c48f784b60ef082e3b1259269857166b143cd9a920b'
+            '015ddcb799259190e3a4b97d386fb8e4cb6f76a22eed2ce97babf10116e886b82f6f3e3e74e3590dd14a8fce8e6ca5980a91205c61e29afa5dbdc387f4daa8dd')
+
+prepare() {
+  cd packaging-$pkgver
+  patch -Np1 -i ../replace-distutils-usage-with-sysconfig.patch
+}
+
+build() {
+  cd packaging-$pkgver
+  python setup.py build
+  python2 setup.py build
+}
+
+check() {
+  cd packaging-$pkgver
+  python -m pytest
+}
+
+package_python-packaging() {
+  depends=('python-pyparsing' 'python-six')
+
+  cd packaging-$pkgver
+  python setup.py install --root "$pkgdir"
+}
+
+package_python2-packaging() {
+  depends=('python2-pyparsing' 'python2-six')
+
+  cd packaging-$pkgver
+  python2 setup.py install --root "$pkgdir"
+}

Deleted: replace-distutils-usage-with-sysconfig.patch
===================================================================
--- replace-distutils-usage-with-sysconfig.patch	2021-12-15 08:42:56 UTC (rev 432546)
+++ replace-distutils-usage-with-sysconfig.patch	2021-12-15 08:43:06 UTC (rev 432547)
@@ -1,196 +0,0 @@
-From 00eb2c82483914a40c50999285397141e0576873 Mon Sep 17 00:00:00 2001
-From: Tzu-ping Chung <uranusjr at gmail.com>
-Date: Sat, 24 Apr 2021 02:49:54 +0800
-Subject: [PATCH] Replace distutils usage with sysconfig (#396)
-
-(cherry picked from commit c8008265eac83ebf2c3b3c314a682abd4c101de2)
----
- packaging/tags.py  |  6 ++----
- tests/test_tags.py | 33 ++++++++++++++++-----------------
- 2 files changed, 18 insertions(+), 21 deletions(-)
-
-diff --git a/packaging/tags.py b/packaging/tags.py
-index d637f1b..de4dc91 100644
---- a/packaging/tags.py
-+++ b/packaging/tags.py
-@@ -4,8 +4,6 @@
- 
- from __future__ import absolute_import
- 
--import distutils.util
--
- try:
-     from importlib.machinery import EXTENSION_SUFFIXES
- except ImportError:  # pragma: no cover
-@@ -781,7 +779,7 @@ def _manylinux_tags(linux, arch):
- 
- def _linux_platforms(is_32bit=_32_BIT_INTERPRETER):
-     # type: (bool) -> Iterator[str]
--    linux = _normalize_string(distutils.util.get_platform())
-+    linux = _normalize_string(sysconfig.get_platform())
-     if is_32bit:
-         if linux == "linux_x86_64":
-             linux = "linux_i686"
-@@ -796,7 +794,7 @@ def _linux_platforms(is_32bit=_32_BIT_INTERPRETER):
- 
- def _generic_platforms():
-     # type: () -> Iterator[str]
--    yield _normalize_string(distutils.util.get_platform())
-+    yield _normalize_string(sysconfig.get_platform())
- 
- 
- def _platform_tags():
-diff --git a/tests/test_tags.py b/tests/test_tags.py
-index 6b0e5b6..3537379 100644
---- a/tests/test_tags.py
-+++ b/tests/test_tags.py
-@@ -11,7 +11,6 @@ try:
-     import ctypes
- except ImportError:
-     ctypes = None
--import distutils.util
- import os
- import platform
- import re
-@@ -492,14 +491,14 @@ class TestManylinuxPlatform:
-     def test_linux_platforms_32_64bit_on_64bit_os(
-         self, arch, is_32bit, expected, monkeypatch
-     ):
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: arch)
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: arch)
-         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
-         monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda *args: False)
-         linux_platform = list(tags._linux_platforms(is_32bit=is_32bit))[-1]
-         assert linux_platform == expected
- 
-     def test_linux_platforms_manylinux_unsupported(self, monkeypatch):
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
-         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
-         monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda *args: False)
-         linux_platform = list(tags._linux_platforms(is_32bit=False))
-@@ -509,7 +508,7 @@ class TestManylinuxPlatform:
-         monkeypatch.setattr(
-             tags, "_is_manylinux_compatible", lambda name, *args: name == "manylinux1"
-         )
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
-         monkeypatch.setattr(platform, "machine", lambda: "x86_64")
-         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
-         platforms = list(tags._linux_platforms(is_32bit=False))
-@@ -517,7 +516,7 @@ class TestManylinuxPlatform:
-         assert platforms == ["manylinux1_" + arch, "linux_" + arch]
- 
-     def test_linux_platforms_manylinux2010(self, monkeypatch):
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
-         monkeypatch.setattr(platform, "machine", lambda: "x86_64")
-         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.12", raising=False)
-         platforms = list(tags._linux_platforms(is_32bit=False))
-@@ -538,7 +537,7 @@ class TestManylinuxPlatform:
-         assert platforms == expected
- 
-     def test_linux_platforms_manylinux2014(self, monkeypatch):
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
-         monkeypatch.setattr(platform, "machine", lambda: "x86_64")
-         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.17", raising=False)
-         platforms = list(tags._linux_platforms(is_32bit=False))
-@@ -571,7 +570,7 @@ class TestManylinuxPlatform:
-             "_is_manylinux_compatible",
-             lambda name, *args: name == "manylinux2014",
-         )
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_armv7l")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_armv7l")
-         monkeypatch.setattr(
-             sys,
-             "executable",
-@@ -583,7 +582,7 @@ class TestManylinuxPlatform:
- 
-     def test_linux_platforms_manylinux2014_i386_abi(self, monkeypatch):
-         monkeypatch.setattr(tags, "_glibc_version_string", lambda: "2.17")
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
-         monkeypatch.setattr(
-             sys,
-             "executable",
-@@ -615,7 +614,7 @@ class TestManylinuxPlatform:
-         # test for a future glic 3.x version
-         monkeypatch.setattr(tags, "_glibc_version_string", lambda: "3.2")
-         monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda name, *args: True)
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_aarch64")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_aarch64")
-         monkeypatch.setattr(
-             sys,
-             "executable",
-@@ -633,7 +632,7 @@ class TestManylinuxPlatform:
-         monkeypatch.setattr(
-             tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2014"
-         )
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_armv6l")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_armv6l")
-         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
-         platforms = list(tags._linux_platforms(is_32bit=True))
-         expected = ["linux_armv6l"]
-@@ -648,7 +647,7 @@ class TestManylinuxPlatform:
-     ):
-         monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda name, _: False)
-         monkeypatch.setattr(
--            distutils.util, "get_platform", lambda: "linux_{}".format(machine)
-+            sysconfig, "get_platform", lambda: "linux_{}".format(machine)
-         )
-         monkeypatch.setattr(
-             sys,
-@@ -995,7 +994,7 @@ class TestGenericTags:
-         assert not list(tags._generic_abi())
- 
-     def test_generic_platforms(self):
--        platform = distutils.util.get_platform().replace("-", "_")
-+        platform = sysconfig.get_platform().replace("-", "_")
-         platform = platform.replace(".", "_")
-         assert list(tags._generic_platforms()) == [platform]
- 
-@@ -1269,14 +1268,14 @@ class TestSysTags:
-         assert result[-1] == expected
- 
-     def test_linux_platforms_manylinux2014_armv6l(self, monkeypatch, manylinux_module):
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_armv6l")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_armv6l")
-         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
-         platforms = list(tags._linux_platforms(is_32bit=True))
-         expected = ["linux_armv6l"]
-         assert platforms == expected
- 
-     def test_skip_manylinux_2014(self, monkeypatch, manylinux_module):
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_ppc64")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_ppc64")
-         monkeypatch.setattr(tags, "_get_glibc_version", lambda: (2, 20))
-         monkeypatch.setattr(
-             manylinux_module, "manylinux2014_compatible", False, raising=False
-@@ -1300,7 +1299,7 @@ class TestSysTags:
-         self, monkeypatch, manylinux_module, machine, abi, alt_machine
-     ):
-         monkeypatch.setattr(
--            distutils.util, "get_platform", lambda: "linux_{}".format(machine)
-+            sysconfig, "get_platform", lambda: "linux_{}".format(machine)
-         )
-         monkeypatch.setattr(
-             sys,
-@@ -1326,7 +1325,7 @@ class TestSysTags:
- 
-         monkeypatch.setattr(tags, "_get_glibc_version", lambda: (major, minor))
-         monkeypatch.setattr(
--            distutils.util, "get_platform", lambda: "linux_{}".format(machine)
-+            sysconfig, "get_platform", lambda: "linux_{}".format(machine)
-         )
-         monkeypatch.setattr(
-             manylinux_module,
-@@ -1349,7 +1348,7 @@ class TestSysTags:
-             return None
- 
-         monkeypatch.setattr(tags, "_get_glibc_version", lambda: (2, 30))
--        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
-+        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
-         monkeypatch.setattr(
-             manylinux_module,
-             "manylinux_compatible",

Copied: python-packaging/repos/extra-any/replace-distutils-usage-with-sysconfig.patch (from rev 432546, python-packaging/trunk/replace-distutils-usage-with-sysconfig.patch)
===================================================================
--- replace-distutils-usage-with-sysconfig.patch	                        (rev 0)
+++ replace-distutils-usage-with-sysconfig.patch	2021-12-15 08:43:06 UTC (rev 432547)
@@ -0,0 +1,196 @@
+From 00eb2c82483914a40c50999285397141e0576873 Mon Sep 17 00:00:00 2001
+From: Tzu-ping Chung <uranusjr at gmail.com>
+Date: Sat, 24 Apr 2021 02:49:54 +0800
+Subject: [PATCH] Replace distutils usage with sysconfig (#396)
+
+(cherry picked from commit c8008265eac83ebf2c3b3c314a682abd4c101de2)
+---
+ packaging/tags.py  |  6 ++----
+ tests/test_tags.py | 33 ++++++++++++++++-----------------
+ 2 files changed, 18 insertions(+), 21 deletions(-)
+
+diff --git a/packaging/tags.py b/packaging/tags.py
+index d637f1b..de4dc91 100644
+--- a/packaging/tags.py
++++ b/packaging/tags.py
+@@ -4,8 +4,6 @@
+ 
+ from __future__ import absolute_import
+ 
+-import distutils.util
+-
+ try:
+     from importlib.machinery import EXTENSION_SUFFIXES
+ except ImportError:  # pragma: no cover
+@@ -781,7 +779,7 @@ def _manylinux_tags(linux, arch):
+ 
+ def _linux_platforms(is_32bit=_32_BIT_INTERPRETER):
+     # type: (bool) -> Iterator[str]
+-    linux = _normalize_string(distutils.util.get_platform())
++    linux = _normalize_string(sysconfig.get_platform())
+     if is_32bit:
+         if linux == "linux_x86_64":
+             linux = "linux_i686"
+@@ -796,7 +794,7 @@ def _linux_platforms(is_32bit=_32_BIT_INTERPRETER):
+ 
+ def _generic_platforms():
+     # type: () -> Iterator[str]
+-    yield _normalize_string(distutils.util.get_platform())
++    yield _normalize_string(sysconfig.get_platform())
+ 
+ 
+ def _platform_tags():
+diff --git a/tests/test_tags.py b/tests/test_tags.py
+index 6b0e5b6..3537379 100644
+--- a/tests/test_tags.py
++++ b/tests/test_tags.py
+@@ -11,7 +11,6 @@ try:
+     import ctypes
+ except ImportError:
+     ctypes = None
+-import distutils.util
+ import os
+ import platform
+ import re
+@@ -492,14 +491,14 @@ class TestManylinuxPlatform:
+     def test_linux_platforms_32_64bit_on_64bit_os(
+         self, arch, is_32bit, expected, monkeypatch
+     ):
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: arch)
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: arch)
+         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
+         monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda *args: False)
+         linux_platform = list(tags._linux_platforms(is_32bit=is_32bit))[-1]
+         assert linux_platform == expected
+ 
+     def test_linux_platforms_manylinux_unsupported(self, monkeypatch):
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
+         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
+         monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda *args: False)
+         linux_platform = list(tags._linux_platforms(is_32bit=False))
+@@ -509,7 +508,7 @@ class TestManylinuxPlatform:
+         monkeypatch.setattr(
+             tags, "_is_manylinux_compatible", lambda name, *args: name == "manylinux1"
+         )
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
+         monkeypatch.setattr(platform, "machine", lambda: "x86_64")
+         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
+         platforms = list(tags._linux_platforms(is_32bit=False))
+@@ -517,7 +516,7 @@ class TestManylinuxPlatform:
+         assert platforms == ["manylinux1_" + arch, "linux_" + arch]
+ 
+     def test_linux_platforms_manylinux2010(self, monkeypatch):
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
+         monkeypatch.setattr(platform, "machine", lambda: "x86_64")
+         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.12", raising=False)
+         platforms = list(tags._linux_platforms(is_32bit=False))
+@@ -538,7 +537,7 @@ class TestManylinuxPlatform:
+         assert platforms == expected
+ 
+     def test_linux_platforms_manylinux2014(self, monkeypatch):
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
+         monkeypatch.setattr(platform, "machine", lambda: "x86_64")
+         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.17", raising=False)
+         platforms = list(tags._linux_platforms(is_32bit=False))
+@@ -571,7 +570,7 @@ class TestManylinuxPlatform:
+             "_is_manylinux_compatible",
+             lambda name, *args: name == "manylinux2014",
+         )
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_armv7l")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_armv7l")
+         monkeypatch.setattr(
+             sys,
+             "executable",
+@@ -583,7 +582,7 @@ class TestManylinuxPlatform:
+ 
+     def test_linux_platforms_manylinux2014_i386_abi(self, monkeypatch):
+         monkeypatch.setattr(tags, "_glibc_version_string", lambda: "2.17")
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
+         monkeypatch.setattr(
+             sys,
+             "executable",
+@@ -615,7 +614,7 @@ class TestManylinuxPlatform:
+         # test for a future glic 3.x version
+         monkeypatch.setattr(tags, "_glibc_version_string", lambda: "3.2")
+         monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda name, *args: True)
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_aarch64")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_aarch64")
+         monkeypatch.setattr(
+             sys,
+             "executable",
+@@ -633,7 +632,7 @@ class TestManylinuxPlatform:
+         monkeypatch.setattr(
+             tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2014"
+         )
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_armv6l")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_armv6l")
+         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
+         platforms = list(tags._linux_platforms(is_32bit=True))
+         expected = ["linux_armv6l"]
+@@ -648,7 +647,7 @@ class TestManylinuxPlatform:
+     ):
+         monkeypatch.setattr(tags, "_is_manylinux_compatible", lambda name, _: False)
+         monkeypatch.setattr(
+-            distutils.util, "get_platform", lambda: "linux_{}".format(machine)
++            sysconfig, "get_platform", lambda: "linux_{}".format(machine)
+         )
+         monkeypatch.setattr(
+             sys,
+@@ -995,7 +994,7 @@ class TestGenericTags:
+         assert not list(tags._generic_abi())
+ 
+     def test_generic_platforms(self):
+-        platform = distutils.util.get_platform().replace("-", "_")
++        platform = sysconfig.get_platform().replace("-", "_")
+         platform = platform.replace(".", "_")
+         assert list(tags._generic_platforms()) == [platform]
+ 
+@@ -1269,14 +1268,14 @@ class TestSysTags:
+         assert result[-1] == expected
+ 
+     def test_linux_platforms_manylinux2014_armv6l(self, monkeypatch, manylinux_module):
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_armv6l")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_armv6l")
+         monkeypatch.setattr(os, "confstr", lambda x: "glibc 2.20", raising=False)
+         platforms = list(tags._linux_platforms(is_32bit=True))
+         expected = ["linux_armv6l"]
+         assert platforms == expected
+ 
+     def test_skip_manylinux_2014(self, monkeypatch, manylinux_module):
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_ppc64")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_ppc64")
+         monkeypatch.setattr(tags, "_get_glibc_version", lambda: (2, 20))
+         monkeypatch.setattr(
+             manylinux_module, "manylinux2014_compatible", False, raising=False
+@@ -1300,7 +1299,7 @@ class TestSysTags:
+         self, monkeypatch, manylinux_module, machine, abi, alt_machine
+     ):
+         monkeypatch.setattr(
+-            distutils.util, "get_platform", lambda: "linux_{}".format(machine)
++            sysconfig, "get_platform", lambda: "linux_{}".format(machine)
+         )
+         monkeypatch.setattr(
+             sys,
+@@ -1326,7 +1325,7 @@ class TestSysTags:
+ 
+         monkeypatch.setattr(tags, "_get_glibc_version", lambda: (major, minor))
+         monkeypatch.setattr(
+-            distutils.util, "get_platform", lambda: "linux_{}".format(machine)
++            sysconfig, "get_platform", lambda: "linux_{}".format(machine)
+         )
+         monkeypatch.setattr(
+             manylinux_module,
+@@ -1349,7 +1348,7 @@ class TestSysTags:
+             return None
+ 
+         monkeypatch.setattr(tags, "_get_glibc_version", lambda: (2, 30))
+-        monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
++        monkeypatch.setattr(sysconfig, "get_platform", lambda: "linux_x86_64")
+         monkeypatch.setattr(
+             manylinux_module,
+             "manylinux_compatible",



More information about the arch-commits mailing list