From 504b8217d39d476f1c3a79d82959915ac18d0952 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 27 Oct 2023 17:20:13 -0700 Subject: [PATCH] openqa etc.: use pip for local installs, not setuptools On Fedora 39, we ran into an issue with setuptools that isn't immediately resolvable: https://github.com/pypa/setuptools/issues/3797#issuecomment-1783613895 using pip like this seems to avoid it. Signed-off-by: Adam Williamson --- roles/check-compose/tasks/main.yml | 6 ++---- roles/fedora_nightlies/tasks/main.yml | 6 ++---- roles/openqa/dispatcher/tasks/main.yml | 6 ++---- roles/relvalconsumer/tasks/main.yml | 6 ++---- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/roles/check-compose/tasks/main.yml b/roles/check-compose/tasks/main.yml index 23668ab0ad..f89279e0fd 100644 --- a/roles/check-compose/tasks/main.yml +++ b/roles/check-compose/tasks/main.yml @@ -110,7 +110,7 @@ - name: Install required packages package: - name: ['fedora-messaging', 'python3-fedfind', 'python3-openqa_client', 'python3-setuptools', + name: ['fedora-messaging', 'python3-fedfind', 'python3-openqa_client', 'python3-pip', 'python3-pip'] state: present tags: @@ -130,9 +130,7 @@ check_mode: no - name: Install check-compose - command: "python3 setup.py install --nodeps" - args: - chdir: /root/check-compose + command: "python3 -m pip install /root/check-compose" when: "gitcc is changed or instcc.rc != 0" notify: - restart check-compose diff --git a/roles/fedora_nightlies/tasks/main.yml b/roles/fedora_nightlies/tasks/main.yml index 1d552f11b5..3cf091634a 100644 --- a/roles/fedora_nightlies/tasks/main.yml +++ b/roles/fedora_nightlies/tasks/main.yml @@ -78,7 +78,7 @@ package: # 'relval' itself is needed as we call it directly for size # checking - name: ['python3-fedfind', 'fedora-messaging', 'python3-pip', 'python3-setuptools', 'python3-openqa_client'] + name: ['python3-fedfind', 'fedora-messaging', 'python3-pip', 'python3-pip', 'python3-openqa_client'] state: present tags: - packages @@ -97,9 +97,7 @@ check_mode: no - name: Install fedora_nightlies - command: "python3 setup.py install" - args: - chdir: /root/fedora_nightlies + command: "python3 -m pip install /root/fedora_nightlies" when: "gitfn is changed or instfn.rc != 0" notify: - restart fedora_nightlies diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index 6db6c86e5f..f7e504972f 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -176,7 +176,7 @@ package: name: ['fedora-messaging', 'python3-fedfind', 'python3-wikitcms', 'python3-openqa_client', 'python3-requests', 'python3-resultsdb_api', 'python3-resultsdb_conventions-fedora', - 'python3-setuptools', 'python3-six', 'python3-pip'] + 'python3-six', 'python3-pip'] state: present tags: - packages @@ -220,9 +220,7 @@ check_mode: no - name: Install fedora_openqa - command: "python3 setup.py install" - args: - chdir: /root/fedora_openqa + command: "python3 -m pip install /root/fedora_openqa" when: "gittools is changed or insttools.rc != 0" notify: - restart openqa consumers diff --git a/roles/relvalconsumer/tasks/main.yml b/roles/relvalconsumer/tasks/main.yml index c9f8687235..0bf34c8f47 100644 --- a/roles/relvalconsumer/tasks/main.yml +++ b/roles/relvalconsumer/tasks/main.yml @@ -107,7 +107,7 @@ # 'relval' itself is needed as we call it directly for size # checking name: ['python3-fedfind', 'python3-wikitcms', 'fedora-messaging', - 'python3-mwclient', 'python3-pip', 'python3-setuptools', 'relval'] + 'python3-mwclient', 'python3-pip', 'python3-pip', 'relval'] state: present tags: - packages @@ -148,9 +148,7 @@ check_mode: no - name: Install relvalconsumer - command: "python3 setup.py install" - args: - chdir: /root/relvalconsumer + command: "python3 -m pip install /root/relvalconsumer" when: "gitrvc is changed or instrvc.rc != 0" notify: - restart relvalconsumer