[Qemu-devel] [PATCH] docker: add python stdlib dependency (required by keycodemapdb)

Philippe Mathieu-Daudé posted 1 patch 6 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171031122824.25686-1-f4bug@amsat.org
Test checkpatch passed
Test docker passed
Test ppc passed
Test s390x passed
tests/docker/dockerfiles/debian8-mxe.docker | 1 +
1 file changed, 1 insertion(+)
[Qemu-devel] [PATCH] docker: add python stdlib dependency (required by keycodemapdb)
Posted by Philippe Mathieu-Daudé 6 years, 5 months ago
Since 927128222b0a QEMU depends of keycodemapdb, which uses the python 'csv'
module from stdlib to parse keymaps.csv.

Without this package the build fails:

    GEN     ui/input-keymap-linux-to-qcode.c
  Traceback (most recent call last):
    File "ui/keycodemapdb/tools/keymap-gen", line 15, in <module>
      import csv
  ImportError: No module named csv
    GEN     ui/input-keymap-qcode-to-qnum.c
  Traceback (most recent call last):
    File "ui/keycodemapdb/tools/keymap-gen", line 15, in <module>
      import csv
  ImportError: No module named csv
  [...]
    CC      ui/input-keymap.o
  ui/input-keymap.c:8:44: fatal error: ui/input-keymap-linux-to-qcode.c: No such file or directory
  make: *** [ui/input-keymap.o] Error 1

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
this might affect native MinGW builds.

(master broken since a4faa26857694fa87d96d15ad5b6afa8fbc2c900)

we didn't notice Shippable failures:
https://app.shippable.com/github/qemu/qemu/runs/501/summary/console and next

 tests/docker/dockerfiles/debian8-mxe.docker | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/docker/dockerfiles/debian8-mxe.docker b/tests/docker/dockerfiles/debian8-mxe.docker
index 7bf1b59e54..9b8e577b03 100644
--- a/tests/docker/dockerfiles/debian8-mxe.docker
+++ b/tests/docker/dockerfiles/debian8-mxe.docker
@@ -13,6 +13,7 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE964
 RUN apt-get update
 RUN DEBIAN_FRONTEND=noninteractive eatmydata \
     apt-get install -y --no-install-recommends \
+        libpython2.7-stdlib \
         $(apt-get -s install -y --no-install-recommends gw32.shared-mingw-w64 gw32.shared-mingw-w64 | egrep "^Inst mxe-x86-64-unknown-" | cut -d\  -f2)
 
 ENV PATH $PATH:/usr/lib/mxe/usr/bin/ 
-- 
2.15.0.rc2


Re: [Qemu-devel] [PATCH] docker: add python stdlib dependency (required by keycodemapdb)
Posted by Alex Bennée 6 years, 5 months ago
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Since 927128222b0a QEMU depends of keycodemapdb, which uses the python 'csv'
> module from stdlib to parse keymaps.csv.
>
> Without this package the build fails:
>
>     GEN     ui/input-keymap-linux-to-qcode.c
>   Traceback (most recent call last):
>     File "ui/keycodemapdb/tools/keymap-gen", line 15, in <module>
>       import csv
>   ImportError: No module named csv
>     GEN     ui/input-keymap-qcode-to-qnum.c
>   Traceback (most recent call last):
>     File "ui/keycodemapdb/tools/keymap-gen", line 15, in <module>
>       import csv
>   ImportError: No module named csv
>   [...]
>     CC      ui/input-keymap.o
>   ui/input-keymap.c:8:44: fatal error: ui/input-keymap-linux-to-qcode.c: No such file or directory
>   make: *** [ui/input-keymap.o] Error 1
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> this might affect native MinGW builds.
>
> (master broken since a4faa26857694fa87d96d15ad5b6afa8fbc2c900)

It did - interesting that the python breakage doesn't halt the build
there and then.

Applied to travis/next

>
> we didn't notice Shippable failures:
> https://app.shippable.com/github/qemu/qemu/runs/501/summary/console and next
>
>  tests/docker/dockerfiles/debian8-mxe.docker | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/docker/dockerfiles/debian8-mxe.docker b/tests/docker/dockerfiles/debian8-mxe.docker
> index 7bf1b59e54..9b8e577b03 100644
> --- a/tests/docker/dockerfiles/debian8-mxe.docker
> +++ b/tests/docker/dockerfiles/debian8-mxe.docker
> @@ -13,6 +13,7 @@ RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE964
>  RUN apt-get update
>  RUN DEBIAN_FRONTEND=noninteractive eatmydata \
>      apt-get install -y --no-install-recommends \
> +        libpython2.7-stdlib \
>          $(apt-get -s install -y --no-install-recommends gw32.shared-mingw-w64 gw32.shared-mingw-w64 | egrep "^Inst mxe-x86-64-unknown-" | cut -d\  -f2)
>
>  ENV PATH $PATH:/usr/lib/mxe/usr/bin/


--
Alex Bennée