[jenkins-ci PATCH 13/17] guests: Install meson via pip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Let's install meson via pip whenever meson is not available at all or
does not match the minimum required version.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 guests/lcitool                             | 13 +++++++++++++
 guests/playbooks/update/tasks/packages.yml |  8 ++++++++
 2 files changed, 21 insertions(+)

diff --git a/guests/lcitool b/guests/lcitool
index 5b5b622..6be396c 100755
--- a/guests/lcitool
+++ b/guests/lcitool
@@ -625,6 +625,11 @@ class Application:
         else:
             keys = base_keys + [self._native_arch + "-" + k for k in base_keys]
 
+        pip_install = []
+        pip_mappings = {
+            "meson" : "meson==0.49.0",
+        }
+
         # We need to add the base project manually here: the standard
         # machinery hides it because it's an implementation detail
         for project in projects + ["base"]:
@@ -644,6 +649,8 @@ class Application:
 
                 if package not in pkgs:
                     continue
+                if package in pip_mappings and pkgs[package] is None:
+                    pip_install += [pip_mappings[package]]
                 if cross_policy == "foreign" and pkgs[package] is not None:
                     cross_pkgs[package] = pkgs[package]
                 if pkgs[package] is None or cross_policy in ["skip", "foreign"]:
@@ -714,6 +721,12 @@ class Application:
                         {package_manager} clean all -y
                 """).format(**varmap))
 
+        if pip_install:
+            varmap["pip_install"] = " ".join(sorted(pip_install))
+            sys.stdout.write(textwrap.dedent("""
+                RUN pip3 install {pip_install}
+            """).format(**varmap))
+
     def run(self):
         args = self._parser.parse_args()
         if args.debug:
diff --git a/guests/playbooks/update/tasks/packages.yml b/guests/playbooks/update/tasks/packages.yml
index ec8a4c4..f2603f8 100644
--- a/guests/playbooks/update/tasks/packages.yml
+++ b/guests/playbooks/update/tasks/packages.yml
@@ -100,3 +100,11 @@
   package:
     name: '{{ flattened|sort }}'
     state: '{{ state }}'
+
+- name: '{{ project }}: Install meson from pip'
+  command: pip3 install meson==0.49.0
+  args:
+    creates: /usr/local/bin/meson
+  when:
+    - temp["meson"] is defined
+    - temp["meson"] == None
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux