[libvirt] [jenkins-ci PATCH 0/2] jobs: Simplify Python jobs

By reverting a bunch of semi-recent changes. Requires https://www.redhat.com/archives/libvir-list/2018-April/msg00356.html Andrea Bolognani (2): jobs: Don't set $PYTHONPATH for python-distutil jobs jobs: Build using $PYTHON jobs/python-distutils.yaml | 29 +++++++++++++---------------- projects/libvirt-python.yaml | 29 ++--------------------------- projects/virt-manager.yaml | 11 ++++------- 3 files changed, 19 insertions(+), 50 deletions(-) -- 2.14.3

Now that $PYTHONPATH is set in the environment through the shell profile, we no longer need to set it at the Jenkins level for the virt-manager build to succeed. This reverts commit 6116509ac308562f69d533651d40599a7ce36b39. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- jobs/python-distutils.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml index 16eca1c..8ef0b27 100644 --- a/jobs/python-distutils.yaml +++ b/jobs/python-distutils.yaml @@ -42,7 +42,6 @@ - shell: | {global_env} {local_env} - export PYTHONPATH=$VIRT_PREFIX/lib/python{pyver}.4/site-packages:$VIRT_PREFIX/lib64/python{pyver}.4/site-packages:$VIRT_PREFIX/lib/python{pyver}.5/site-packages:$VIRT_PREFIX/lib64/python{pyver}.5/site-packages:$VIRT_PREFIX/lib/python{pyver}.6/site-packages:$VIRT_PREFIX/lib64/python{pyver}.6/site-packages:$VIRT_PREFIX/lib/python{pyver}.7/site-packages:$VIRT_PREFIX/lib64/python{pyver}.7/site-packages {command_pre_build} python{pyver} ./setup.py build python{pyver} ./setup.py install --prefix=$VIRT_PREFIX @@ -84,7 +83,6 @@ - shell: | {global_env} {local_env} - export PYTHONPATH=$VIRT_PREFIX/lib/python{pyver}.4/site-packages:$VIRT_PREFIX/lib64/python{pyver}.4/site-packages:$VIRT_PREFIX/lib/python{pyver}.5/site-packages:$VIRT_PREFIX/lib64/python{pyver}.5/site-packages:$VIRT_PREFIX/lib/python{pyver}.6/site-packages:$VIRT_PREFIX/lib64/python{pyver}.6/site-packages:$VIRT_PREFIX/lib/python{pyver}.7/site-packages:$VIRT_PREFIX/lib64/python{pyver}.7/site-packages python{pyver} ./setup.py test publishers: - email: @@ -123,7 +121,6 @@ - shell: | {global_env} {local_env} - export PYTHONPATH=$VIRT_PREFIX/lib/python{pyver}.4/site-packages:$VIRT_PREFIX/lib64/python{pyver}.4/site-packages:$VIRT_PREFIX/lib/python{pyver}.5/site-packages:$VIRT_PREFIX/lib64/python{pyver}.5/site-packages:$VIRT_PREFIX/lib/python{pyver}.6/site-packages:$VIRT_PREFIX/lib64/python{pyver}.6/site-packages:$VIRT_PREFIX/lib/python{pyver}.7/site-packages:$VIRT_PREFIX/lib64/python{pyver}.7/site-packages sed -i -e 's/BuildRequires: libvirt.*devel.*//' *.spec.in python{pyver} ./setup.py rpm publishers: -- 2.14.3

The current setup is fairly complicated and doesn't buy us much in terms of coverage: we can default to Python 3 wherever it's available, and still test Python 2 builds pass thanks to CentOS, which doesn't have Python 3 yet, and the RPM build jobs, which build both variants if at all possible. This reverts commit 57980d405d631f4ce2bfffcec343e506fde343f9 and then some. Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- jobs/python-distutils.yaml | 26 +++++++++++++------------- projects/libvirt-python.yaml | 29 ++--------------------------- projects/virt-manager.yaml | 11 ++++------- 3 files changed, 19 insertions(+), 47 deletions(-) diff --git a/jobs/python-distutils.yaml b/jobs/python-distutils.yaml index 8ef0b27..bfa0715 100644 --- a/jobs/python-distutils.yaml +++ b/jobs/python-distutils.yaml @@ -1,11 +1,11 @@ - job-template: id: python-distutils-build-job - name: '{name}-{branch}-py{pyver}-build' + name: '{name}-{branch}-build' project-type: matrix - description: '{title} Build (Python {pyver})' + description: '{title} Build' command_pre_build: '' - workspace: '{name}-{branch}-py{pyver}' + workspace: '{name}-{branch}' child-workspace: '.' block-downstream: true block-upstream: true @@ -43,8 +43,8 @@ {global_env} {local_env} {command_pre_build} - python{pyver} ./setup.py build - python{pyver} ./setup.py install --prefix=$VIRT_PREFIX + $PYTHON ./setup.py build + $PYTHON ./setup.py install --prefix=$VIRT_PREFIX publishers: - email: recipients: '{obj:spam}' @@ -54,10 +54,10 @@ - job-template: id: python-distutils-check-job - name: '{name}-{branch}-py{pyver}-check' + name: '{name}-{branch}-check' project-type: matrix - description: '{title} Check (Python {pyver})' - workspace: '{name}-{branch}-py{pyver}' + description: '{title} Check' + workspace: '{name}-{branch}' child-workspace: '.' block-downstream: true block-upstream: true @@ -83,7 +83,7 @@ - shell: | {global_env} {local_env} - python{pyver} ./setup.py test + $PYTHON ./setup.py test publishers: - email: recipients: '{obj:spam}' @@ -92,10 +92,10 @@ - job-template: id: python-distutils-rpm-job - name: '{name}-{branch}-py{pyver}-rpm' + name: '{name}-{branch}-rpm' project-type: matrix - description: '{title} RPM (Python {pyver})' - workspace: '{name}-{branch}-py{pyver}' + description: '{title} RPM' + workspace: '{name}-{branch}' child-workspace: '.' block-downstream: true block-upstream: true @@ -122,7 +122,7 @@ {global_env} {local_env} sed -i -e 's/BuildRequires: libvirt.*devel.*//' *.spec.in - python{pyver} ./setup.py rpm + $PYTHON ./setup.py rpm publishers: - email: recipients: '{obj:spam}' diff --git a/projects/libvirt-python.yaml b/projects/libvirt-python.yaml index 1c29321..dd8ac13 100644 --- a/projects/libvirt-python.yaml +++ b/projects/libvirt-python.yaml @@ -14,36 +14,11 @@ title: Libvirt Python jobs: - python-distutils-build-job: - pyver: 2 parent_jobs: 'libvirt-master-build' - - python-distutils-build-job: - pyver: 3 - parent_jobs: 'libvirt-master-build' - machines: - - libvirt-debian-8 - - libvirt-debian-9 - - libvirt-fedora-26 - - libvirt-fedora-27 - - libvirt-fedora-rawhide - - libvirt-freebsd-10 - - libvirt-freebsd-11 - python-distutils-check-job: - pyver: 2 - parent_jobs: 'libvirt-python-master-py{pyver}-build' - - python-distutils-check-job: - pyver: 3 - parent_jobs: 'libvirt-python-master-py{pyver}-build' - machines: - - libvirt-debian-8 - - libvirt-debian-9 - - libvirt-fedora-26 - - libvirt-fedora-27 - - libvirt-fedora-rawhide - - libvirt-freebsd-10 - - libvirt-freebsd-11 + parent_jobs: 'libvirt-python-master-build' - python-distutils-rpm-job: - pyver: 2 - parent_jobs: 'libvirt-python-master-py{pyver}-check' + parent_jobs: 'libvirt-python-master-check' machines: - libvirt-centos-6 - libvirt-centos-7 diff --git a/projects/virt-manager.yaml b/projects/virt-manager.yaml index e626cb0..8c18680 100644 --- a/projects/virt-manager.yaml +++ b/projects/virt-manager.yaml @@ -11,15 +11,13 @@ title: Virtual Machine Manager jobs: - python-distutils-build-job: - pyver: 3 parent_jobs: - - 'libvirt-python-master-py{pyver}-build' + - 'libvirt-python-master-build' - 'libosinfo-master-build' command_pre_build: | - python{pyver} ./setup.py configure --prefix=$VIRT_PREFIX + $PYTHON ./setup.py configure --prefix=$VIRT_PREFIX - python-distutils-check-job: - pyver: 3 - parent_jobs: 'virt-manager-master-py{pyver}-build' + parent_jobs: 'virt-manager-master-build' # libxml2's Python 3 bindings don't work properly on FreeBSD, # so skip the test suite there for the time being. See # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224902 @@ -29,8 +27,7 @@ - libvirt-fedora-27 - libvirt-fedora-rawhide - python-distutils-rpm-job: - pyver: 3 - parent_jobs: 'virt-manager-master-py{pyver}-check' + parent_jobs: 'virt-manager-master-check' machines: - libvirt-fedora-26 - libvirt-fedora-27 -- 2.14.3

On Thu, Apr 05, 2018 at 05:23:58PM +0200, Andrea Bolognani wrote:
By reverting a bunch of semi-recent changes.
Requires
https://www.redhat.com/archives/libvir-list/2018-April/msg00356.html
Andrea Bolognani (2): jobs: Don't set $PYTHONPATH for python-distutil jobs jobs: Build using $PYTHON
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
participants (2)
-
Andrea Bolognani
-
Pavel Hrdina