[libvirt-ci PATCH] vars: Add python3-wheel to the base package dependencies

Erik Skultety posted 1 patch 3 years, 12 months ago
Failed in applying to current master (apply log)
guests/vars/mappings.yml      | 4 ++++
guests/vars/projects/base.yml | 1 +
2 files changed, 5 insertions(+)
[libvirt-ci PATCH] vars: Add python3-wheel to the base package dependencies
Posted by Erik Skultety 3 years, 12 months ago
On platforms where we need to install meson from pip, one will very
likely see something similar to this when building a container from the
generated Dockerfile:

    Collecting meson==0.49.0
      Downloading <url>/meson-0.49.0.tar.gz (1.3MB)
        100% |################################| 1.3MB 874kB/s
    Building wheels for collected packages: meson
      Running setup.py bdist_wheel for meson ... error
      error: invalid command 'bdist_wheel'
      ----------------------------------------
      Failed building wheel for meson
      Running setup.py clean for meson
    Failed to build meson

Pip is missing the 'wheel' package necessary to build a wheel from
sources, if it fails to do that, it falls back to the good old:
    $ setup.py install meson
which succeeds and no harm was done. However, seeing an error in the
log always raises eyebrows, so let's fix that very simply by installing
the 'wheel' package which is available on all supported platforms.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
Alternatively, we could use --no-cache-dir with pip install, but I'm not sure
whether it would be enough with new versions of pip. I still feel like
installing the 'wheel' package explicitly is a more transparent and safe fix
even though we don't benefit from the resulting meson wheel package inside
containers at all.

 guests/vars/mappings.yml      | 4 ++++
 guests/vars/projects/base.yml | 1 +
 2 files changed, 5 insertions(+)

diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index 753f0fe..4a19fb4 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -909,6 +909,10 @@ mappings:
     default: python3-setuptools
     FreeBSD: py37-setuptools
 
+  python3-wheel:
+    default: python3-wheel
+    FreeBSD: py37-wheel
+
   qemu-img:
     default: qemu-utils
     rpm: qemu-img
diff --git a/guests/vars/projects/base.yml b/guests/vars/projects/base.yml
index 29c10b4..81c4462 100644
--- a/guests/vars/projects/base.yml
+++ b/guests/vars/projects/base.yml
@@ -28,6 +28,7 @@ packages:
   - python3
   - python3-pip
   - python3-setuptools
+  - python3-wheel
   - rpmbuild
   - screen
   - strace
-- 
2.25.3

Re: [libvirt-ci PATCH] vars: Add python3-wheel to the base package dependencies
Posted by Andrea Bolognani 3 years, 12 months ago
On Wed, 2020-04-29 at 11:21 +0200, Erik Skultety wrote:
> On platforms where we need to install meson from pip, one will very
> likely see something similar to this when building a container from the
> generated Dockerfile:
> 
>     Collecting meson==0.49.0
>       Downloading <url>/meson-0.49.0.tar.gz (1.3MB)
>         100% |################################| 1.3MB 874kB/s
>     Building wheels for collected packages: meson
>       Running setup.py bdist_wheel for meson ... error
>       error: invalid command 'bdist_wheel'
>       ----------------------------------------
>       Failed building wheel for meson
>       Running setup.py clean for meson
>     Failed to build meson
> 
> Pip is missing the 'wheel' package necessary to build a wheel from
> sources, if it fails to do that, it falls back to the good old:
>     $ setup.py install meson
> which succeeds and no harm was done. However, seeing an error in the
> log always raises eyebrows, so let's fix that very simply by installing
> the 'wheel' package which is available on all supported platforms.
> 
> Signed-off-by: Erik Skultety <eskultet@redhat.com>
> ---
> Alternatively, we could use --no-cache-dir with pip install, but I'm not sure
> whether it would be enough with new versions of pip. I still feel like
> installing the 'wheel' package explicitly is a more transparent and safe fix
> even though we don't benefit from the resulting meson wheel package inside
> containers at all.
> 
>  guests/vars/mappings.yml      | 4 ++++
>  guests/vars/projects/base.yml | 1 +
>  2 files changed, 5 insertions(+)

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization