[jenkins-ci PATCH 2/2] jobs: Switch all Python builds to Python 3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virt-manager is Python 3 only now, so using Python 2 to call
its build script will not work.

Moreover, since we build and test it against our local copy of
libvirt-python, we need to make sure libvirt-python itself is
built for Python 3. At the moment, we don't have support for
building against several Python versions, so our only option is
to switch from Python 2 to Python 3 entirely.

We don't lose all build coverage for the Python 2 bits thanks
to the fact that the libvirt-python-master-rpm job will still
build both python2-libvirt and python3-libvirt, but we
definitely want to come up with a better solution in the long
run.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 guests/host_vars/libvirt-centos-6/main.yml | 1 -
 guests/host_vars/libvirt-centos-7/main.yml | 1 -
 jobs/python-distutils.yaml                 | 8 ++++----
 projects/virt-manager.yaml                 | 2 +-
 4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/guests/host_vars/libvirt-centos-6/main.yml b/guests/host_vars/libvirt-centos-6/main.yml
index d717ae7..c3651f3 100644
--- a/guests/host_vars/libvirt-centos-6/main.yml
+++ b/guests/host_vars/libvirt-centos-6/main.yml
@@ -5,4 +5,3 @@ projects:
   - libvirt
   - libvirt-cim
   - libvirt-perl
-  - libvirt-python
diff --git a/guests/host_vars/libvirt-centos-7/main.yml b/guests/host_vars/libvirt-centos-7/main.yml
index 8338f99..15812ae 100644
--- a/guests/host_vars/libvirt-centos-7/main.yml
+++ b/guests/host_vars/libvirt-centos-7/main.yml
@@ -9,7 +9,6 @@ projects:
   - libvirt-go
   - libvirt-go-xml
   - libvirt-perl
-  - libvirt-python
   - libvirt-sandbox
   - osinfo-db
   - osinfo-db-tools
diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml
index 47b25f1..a6fd107 100644
--- a/jobs/python-distutils.yaml
+++ b/jobs/python-distutils.yaml
@@ -43,8 +43,8 @@
           {global_env}
           {local_env}
           {command_pre_build}
-          python2 setup.py build
-          python2 setup.py install --prefix=$VIRT_PREFIX
+          python3 setup.py build
+          python3 setup.py install --prefix=$VIRT_PREFIX
     publishers:
       - email:
           recipients: '{obj:spam}'
@@ -83,7 +83,7 @@
       - shell: |
           {global_env}
           {local_env}
-          python2 setup.py test
+          python3 setup.py test
     publishers:
       - email:
           recipients: '{obj:spam}'
@@ -122,7 +122,7 @@
           {global_env}
           {local_env}
           sed -i -e 's/BuildRequires: libvirt.*devel.*//' *.spec.in
-          python2 setup.py rpm
+          python3 setup.py rpm
     publishers:
       - email:
           recipients: '{obj:spam}'
diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml
index c1d198b..6a99a91 100644
--- a/projects/virt-manager.yaml
+++ b/projects/virt-manager.yaml
@@ -17,7 +17,7 @@
             - 'libvirt-python-master-build'
             - 'libosinfo-master-build'
           command_pre_build: |
-            python2 setup.py configure --prefix=$VIRT_PREFIX
+            python3 setup.py configure --prefix=$VIRT_PREFIX
       - python-distutils-check-job:
           parent_jobs: 'virt-manager-master-build'
       - python-distutils-rpm-job:
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux