Skip to contentSkip to conversation

Compiling without python?

Qemu-devel Applied Sebastian Herbszt 5 participants 10 messages Dec 30, 2011 – Jan 3, 2012

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Sebastian Herbszt

Is it still possible to compile without python?

python /v1.0-267-gda5361c/scripts/qapi-commands.py -m -o . /bin/sh: python: command not found
make: *** [qmp-commands.h] Error 127

Sebastian

Care to answer?

Thanks,
Sebastian

#1 lore raw

Am 30.12.2011 23:36, schrieb Sebastian Herbszt:

Quoted 7 lines
Quoted 6 lines · Sebastian Herbszt

Is it still possible to compile without python?

python /v1.0-267-gda5361c/scripts/qapi-commands.py -m -o . /bin/sh: python: command not found
make: *** [qmp-commands.h] Error 127

Quoted 6 lines
Quoted 1 line

Sebastian

Care to answer?

Thanks,
Sebastian

No, this is no longer possible. You need Python 2.x. Python 3.x does not work!

Regards,
Stefan

#2 lore raw

[Qemu-devel] Subject: [PATCH] Make python mandatory

Make python mandatory.

---
 configure |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
configure +5 -7
index 640e815..6c2a1b4 100755
@@ -1185,13 +1185,11 @@ if test "$solaris" = "yes" ; then
   fi
 fi
 
-if test "$guest_agent" != "no" ; then
-  if has $python; then
-    :
-  else
-    echo "Python not found. Use --python=/path/to/python"
-    exit 1
-  fi
+if has $python; then
+  :
+else
+  echo "Python not found. Use --python=/path/to/python"
+  exit 1
 fi
 
 if test -z "$target_list" ; then
Signature · 1 line
1.7.3.4
#3 lore raw

Re: [Qemu-devel] Subject: [PATCH] Make python mandatory

Quoted 10 lines · Sebastian Herbszt

Make python mandatory.

configure +5 -0
+if has $python; then
+  :
+else
+  echo "Python not found. Use --python=/path/to/python"
+  exit 1

 fi

 if test -z "$target_list" ; then

I know you've just removed the outer condition here, but while we're fiddling with it, wouldn't
if ! has "$python"; then
echo "Python not found etc"
fi

be better?

-- PMM

#4 lore raw

Re: [Qemu-devel] Subject: [PATCH] Make python mandatory

Quoted 18 lines · Peter Maydell
Quoted 10 lines · Sebastian Herbszt

Make python mandatory.

configure +5 -0
+if has $python; then
+ :
+else
+ echo "Python not found. Use --python=/path/to/python"
+ exit 1

fi

if test -z "$target_list" ; then

I know you've just removed the outer condition here, but while we're fiddling with it, wouldn't
if ! has "$python"; then
echo "Python not found etc"
fi

Quoted 3 lines

be better?

-- PMM

I just restored it to the state it was before commit "guest agent: add --enable-guest-agent config option". This check was added in commit "Let users select their pythons".

Sebastian

#5 lore raw

PATCH v2 1/1 Make python mandatory

In reply to Peter Maydell

Make python mandatory.

---
 configure |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
configure +3 -7
index 640e815..a54439d 100755
@@ -1185,13 +1185,9 @@ if test "$solaris" = "yes" ; then
   fi
 fi
 
-if test "$guest_agent" != "no" ; then
-  if has $python; then
-    :
-  else
-    echo "Python not found. Use --python=/path/to/python"
-    exit 1
-  fi
+if ! has $python; then
+  echo "Python not found. Use --python=/path/to/python"
+  exit 1
 fi
 
 if test -z "$target_list" ; then
Signature · 1 line
1.7.3.4
Reviewed-by on v2 1/1
#6 lore raw

Re: [Qemu-devel] [PATCH V2] Make python mandatory

Am 31.12.2011 12:14, schrieb Sebastian Herbszt:

Quoted 27 lines

Make python mandatory.

---
configure | 10 +++-------

1 files changed, 3 insertions(+), 7 deletions(-)
configure +0 -0
index 640e815..a54439d 100755
@@ -1185,13 +1185,9 @@ if test "$solaris" = "yes" ; then

fi
fi

configure +3 -7
-if test "$guest_agent" != "no" ; then
- if has $python; then
- :
- else
- echo "Python not found. Use --python=/path/to/python"
- exit 1
- fi
+if ! has $python; then
+ echo "Python not found. Use --python=/path/to/python"
+ exit 1

fi

Quoted 1 line

if test -z "$target_list" ; then

Maybe this patch can be applied via qemu-trivial.

Regards,

Stefan Weil

#7 lore raw

Re: [Qemu-devel] [Qemu-trivial] [PATCH V2] Make python mandatory

Quoted 28 lines · Stefan Weil

Am 31.12.2011 12:14, schrieb Sebastian Herbszt:

Quoted 27 lines

Make python mandatory.

---
configure | 10 +++-------

1 files changed, 3 insertions(+), 7 deletions(-)
configure +0 -0
index 640e815..a54439d 100755
@@ -1185,13 +1185,9 @@ if test "$solaris" = "yes" ; then

fi
fi

configure +3 -7
-if test "$guest_agent" != "no" ; then
- if has $python; then
- :
- else
- echo "Python not found. Use --python=/path/to/python"
- exit 1
- fi
+if ! has $python; then
+ echo "Python not found. Use --python=/path/to/python"
+ exit 1

fi

Quoted 5 lines
Quoted 1 line

if test -z "$target_list" ; then

Maybe this patch can be applied via qemu-trivial.

Thanks, applied to the trivial patches -next tree:

https://github.com/stefanha/qemu/tree/trivial-patches-next

Stefan

#8 lore raw

Re: [Qemu-devel] [PATCH V2] Make python mandatory

In reply to Sebastian Herbszt
Quoted 4 lines · Sebastian Herbszt

+if ! has $python; then
+  echo "Python not found. Use --python=/path/to/python"
+  exit 1
 fi

This will do the wrong thing if the user runs configure with '--python=/path with spaces/python', but the Makefile won't cope with that either so I guess it's not that important.

-- PMM

#9 lore raw
In reply to Sebastian Herbszt
Quoted 7 lines · Sebastian Herbszt
Quoted 6 lines · Sebastian Herbszt

Is it still possible to compile without python?

python /v1.0-267-gda5361c/scripts/qapi-commands.py -m -o . /bin/sh: python: command not found
make: *** [qmp-commands.h] Error 127

Quoted 6 lines
Quoted 1 line

Sebastian

Care to answer?

Thanks,
Sebastian

Probably not. I think configure should check for python.

Signature · 1 line
MST