From 1325a7ab15224132d1ce334c3e7b3ca2512e05d7 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Fri, 20 Sep 2024 11:10:09 -0700 Subject: [PATCH] adamverse: add --no-deps to pip install commands In various roles I maintain I use `python3 -m pip install` to directly install a Python project (usually a fedora-messaging consumer), to avoid the pointless bureaucracy of packaging them. The roles install all the deps of these projects as packages first, so pip doesn't have to install any deps, it only installs the project itself. Well...that's the idea. It's possible for this to go wrong (say I forget to update the roles when adding a dep to the project), and in that case I think we'd rather have things blow up (so I know something's wrong) than have pip silently install some random upstream wheel system-wide to make it work. The intent is that all the deps still come from proper Fedora packages, only these projects themselves get installed directly. Signed-off-by: Adam Williamson --- roles/check-compose/tasks/main.yml | 2 +- roles/fedora_nightlies/tasks/main.yml | 2 +- roles/openqa/dispatcher/tasks/main.yml | 2 +- roles/relvalconsumer/tasks/main.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/check-compose/tasks/main.yml b/roles/check-compose/tasks/main.yml index f89279e0fd..34f432ae6a 100644 --- a/roles/check-compose/tasks/main.yml +++ b/roles/check-compose/tasks/main.yml @@ -130,7 +130,7 @@ check_mode: no - name: Install check-compose - command: "python3 -m pip install /root/check-compose" + command: "python3 -m pip install --no-deps /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 3cf091634a..fb2b2f8fac 100644 --- a/roles/fedora_nightlies/tasks/main.yml +++ b/roles/fedora_nightlies/tasks/main.yml @@ -97,7 +97,7 @@ check_mode: no - name: Install fedora_nightlies - command: "python3 -m pip install /root/fedora_nightlies" + command: "python3 -m pip install --no-deps /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 f86bc04f45..38c2922d3f 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -220,7 +220,7 @@ check_mode: no - name: Install fedora_openqa - command: "python3 -m pip install /root/fedora_openqa" + command: "python3 -m pip install --no-deps /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 0bf34c8f47..d72bd5226b 100644 --- a/roles/relvalconsumer/tasks/main.yml +++ b/roles/relvalconsumer/tasks/main.yml @@ -148,7 +148,7 @@ check_mode: no - name: Install relvalconsumer - command: "python3 -m pip install /root/relvalconsumer" + command: "python3 -m pip install --no-deps /root/relvalconsumer" when: "gitrvc is changed or instrvc.rc != 0" notify: - restart relvalconsumer