On 12/12/2013 04:26 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
This updates autobuild.sh to test the python3 build process.
The RPM specfile is changed to build a libvirt-python3 RPM
on Fedora > 18
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
autobuild.sh | 14 +++++++++----
libvirt-python.spec.in | 53 +++++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/autobuild.sh b/autobuild.sh
index b3beaf1..5dffe96 100755
--- a/autobuild.sh
+++ b/autobuild.sh
@@ -7,11 +7,17 @@ set -ve
rm -rf MANIFEST dist build
-python setup.py sdist
+python2 setup.py sdist
I just checked that 'python2' exists in RHEL 5, so you're safe on that
front.
+++ b/libvirt-python.spec.in
@@ -1,5 +1,10 @@
-Summary: The libvirt virtualization API python binding
+%define with_python3 0
+%if 0%{?fedora} > 18
Is it worth a 0%{?rhel} >= 7 check as well, now that we have some idea
of what is in the RHEL 7 public beta? But there's enough other places
in the spec file (both here and in libvirt.git) that could be improved
for RHEL 7 so it's not a showstopper to this particular patch.
ACK.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org