From 545cc70f2f6eed9d13ac66d6b4009557e73493ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Fri, 25 Mar 2022 12:28:47 +0000 Subject: gitlab: switch to using 'pip' for package installation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The distutils/setuptools 'install' command is deprecated in favour of 'pip', and with recent versiosn, using it will create a bad install that triggers a traceback on all future use of setuptools: Traceback (most recent call last): File "/builds/berrange/libvirt-python/setup.py", line 328, in setup(name = 'libvirt-python', File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 154, in setup _install_setup_requires(attrs) File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 143, in _install_setup_requires dist = MinimalDistribution(attrs) File "/usr/lib/python3.10/site-packages/setuptools/__init__.py", line 135, in __init__ super().__init__(filtered) File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 456, in __init__ for ep in metadata.entry_points(group='distutils.setup_keywords'): File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 1009, in entry_points return SelectableGroups.load(eps).select(**params) File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 459, in load ordered = sorted(eps, key=by_group) File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 1006, in eps = itertools.chain.from_iterable( File "/usr/lib64/python3.10/importlib/metadata/_itertools.py", line 16, in unique_everseen k = key(element) File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 941, in _normalized_name return self._name_from_stem(stem) or super()._normalized_name File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 622, in _normalized_name return Prepared.normalize(self.name) File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 871, in normalize return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_') File "/usr/lib64/python3.10/re.py", line 209, in sub return _compile(pattern, flags).sub(repl, string, count) This is certainly a bug in distutils/setuptools, but given the 'install' command is deprecated, instead of waiting for a fix, just switch to the recommend 'pip install .' command. Signed-off-by: Daniel P. Berrangé --- ci/containers/centos-stream-8.Dockerfile | 1 + ci/containers/debian-10.Dockerfile | 1 + ci/containers/debian-sid.Dockerfile | 1 + ci/containers/fedora-34.Dockerfile | 1 + ci/containers/fedora-35.Dockerfile | 1 + ci/containers/fedora-rawhide.Dockerfile | 1 + ci/containers/opensuse-leap-152.Dockerfile | 1 + ci/containers/opensuse-tumbleweed.Dockerfile | 1 + ci/containers/ubuntu-1804.Dockerfile | 1 + ci/containers/ubuntu-2004.Dockerfile | 1 + 10 files changed, 10 insertions(+) (limited to 'ci') diff --git a/ci/containers/centos-stream-8.Dockerfile b/ci/containers/centos-stream-8.Dockerfile index 83b3fe6..fff1a19 100644 --- a/ci/containers/centos-stream-8.Dockerfile +++ b/ci/containers/centos-stream-8.Dockerfile @@ -37,6 +37,7 @@ RUN dnf update -y && \ python3-devel \ python3-docutils \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools \ rpcgen \ diff --git a/ci/containers/debian-10.Dockerfile b/ci/containers/debian-10.Dockerfile index dd28856..0def4f5 100644 --- a/ci/containers/debian-10.Dockerfile +++ b/ci/containers/debian-10.Dockerfile @@ -21,6 +21,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3 \ python3-dev \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools && \ eatmydata apt-get autoremove -y && \ diff --git a/ci/containers/debian-sid.Dockerfile b/ci/containers/debian-sid.Dockerfile index a5e5b52..ad0f52d 100644 --- a/ci/containers/debian-sid.Dockerfile +++ b/ci/containers/debian-sid.Dockerfile @@ -21,6 +21,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3 \ python3-dev \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools && \ eatmydata apt-get autoremove -y && \ diff --git a/ci/containers/fedora-34.Dockerfile b/ci/containers/fedora-34.Dockerfile index 7e1452b..2e3c2ae 100644 --- a/ci/containers/fedora-34.Dockerfile +++ b/ci/containers/fedora-34.Dockerfile @@ -28,6 +28,7 @@ exec "$@"' > /usr/bin/nosync && \ python3 \ python3-devel \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools \ rpm-build && \ diff --git a/ci/containers/fedora-35.Dockerfile b/ci/containers/fedora-35.Dockerfile index ed2b501..8980e0b 100644 --- a/ci/containers/fedora-35.Dockerfile +++ b/ci/containers/fedora-35.Dockerfile @@ -28,6 +28,7 @@ exec "$@"' > /usr/bin/nosync && \ python3 \ python3-devel \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools \ rpm-build && \ diff --git a/ci/containers/fedora-rawhide.Dockerfile b/ci/containers/fedora-rawhide.Dockerfile index 44bad30..7ad90a6 100644 --- a/ci/containers/fedora-rawhide.Dockerfile +++ b/ci/containers/fedora-rawhide.Dockerfile @@ -29,6 +29,7 @@ exec "$@"' > /usr/bin/nosync && \ python3 \ python3-devel \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools \ rpm-build && \ diff --git a/ci/containers/opensuse-leap-152.Dockerfile b/ci/containers/opensuse-leap-152.Dockerfile index 9218ff7..c90905e 100644 --- a/ci/containers/opensuse-leap-152.Dockerfile +++ b/ci/containers/opensuse-leap-152.Dockerfile @@ -18,6 +18,7 @@ RUN zypper update -y && \ python3-base \ python3-devel \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools \ rpm-build && \ diff --git a/ci/containers/opensuse-tumbleweed.Dockerfile b/ci/containers/opensuse-tumbleweed.Dockerfile index df23812..f9ba881 100644 --- a/ci/containers/opensuse-tumbleweed.Dockerfile +++ b/ci/containers/opensuse-tumbleweed.Dockerfile @@ -18,6 +18,7 @@ RUN zypper dist-upgrade -y && \ python3-base \ python3-devel \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools \ rpm-build && \ diff --git a/ci/containers/ubuntu-1804.Dockerfile b/ci/containers/ubuntu-1804.Dockerfile index cc07c71..74a73c7 100644 --- a/ci/containers/ubuntu-1804.Dockerfile +++ b/ci/containers/ubuntu-1804.Dockerfile @@ -21,6 +21,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3 \ python3-dev \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools && \ eatmydata apt-get autoremove -y && \ diff --git a/ci/containers/ubuntu-2004.Dockerfile b/ci/containers/ubuntu-2004.Dockerfile index 950780e..63419a7 100644 --- a/ci/containers/ubuntu-2004.Dockerfile +++ b/ci/containers/ubuntu-2004.Dockerfile @@ -21,6 +21,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ python3 \ python3-dev \ python3-lxml \ + python3-pip \ python3-pytest \ python3-setuptools && \ eatmydata apt-get autoremove -y && \ -- cgit v1.2.1