]> xenbits.xensource.com Git - xen.git/commitdiff
automation: Only build QEMU if Python >= 3.5
authorAnthony PERARD <anthony.perard@citrix.com>
Mon, 20 Jan 2020 11:50:51 +0000 (11:50 +0000)
committerWei Liu <wl@xen.org>
Mon, 27 Jan 2020 14:44:07 +0000 (14:44 +0000)
Recent version of QEMU will not build anymore if Python < 3.5.
That is, QEMU 4.3 not released yet.

That check would also prevent the GitLab CI from building QEMU if
python3 binary isn't present.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
automation/scripts/build

index 83c44e6ce758dd991eefa23c946be6c258a822de..0cd0f3971de5777eb1bc850bc068115c8b5a6cb1 100755 (executable)
@@ -28,8 +28,8 @@ if [[ "${CC}" == "clang"* ]]; then
     cfgargs+=("--disable-stubdom")
 fi
 
-# Qemu requires Python 2.7 or later
-if python -c "import sys; res = sys.version_info < (2, 7); exit(not(res))"; then
+# Qemu requires Python 3.5 or later
+if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))"; then
     cfgargs+=("--with-system-qemu=/bin/false")
 fi