[Xen-devel] [XEN PATCH 1/3] automation: Only build QEMU if Python >= 3.5

Anthony PERARD posted 3 patches 6 years ago
[Xen-devel] [XEN PATCH 1/3] automation: Only build QEMU if Python >= 3.5
Posted by Anthony PERARD 6 years ago
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>
---
 automation/scripts/build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index 83c44e6ce758..0cd0f3971de5 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -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
 
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [XEN PATCH 1/3] automation: Only build QEMU if Python >= 3.5
Posted by Doug Goldstein 6 years ago

On 1/20/20 5:50 AM, Anthony PERARD wrote:
> 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>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel