From nobody Sun Apr 28 05:29:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1505831397185944.3292173549913; Tue, 19 Sep 2017 07:29:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB2744A708; Tue, 19 Sep 2017 14:29:55 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CDEC05D97D; Tue, 19 Sep 2017 14:29:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 891C2410B4; Tue, 19 Sep 2017 14:29:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v8JDjgRj016649 for ; Tue, 19 Sep 2017 09:45:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 031BE5D982; Tue, 19 Sep 2017 13:45:42 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.42.22.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F58B5D983; Tue, 19 Sep 2017 13:45:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EB2744A708 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Tue, 19 Sep 2017 14:45:37 +0100 Message-Id: <20170919134537.22085-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH python v2] Add travis build config X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 19 Sep 2017 14:29:56 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Enable builds on several python versions, and against several versions of libvirt. Ideally we would build all the way back to 0.9.11, since that is the min supported libvirt for python binding. It is not possible to build this old libvirt version on modern distros though, so using 1.2.0 as the oldest for now. Signed-off-by: Daniel P. Berrange Reviewed-by: Martin Kletzander --- .travis.yml | 55 +++++++++++++++++++++++++++++++++++++++++++++++= ++++ requirements-test.txt | 2 ++ setup.py | 15 +++++++------- 3 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 .travis.yml create mode 100644 requirements-test.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f608ca1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,55 @@ +language: python +os: linux + +python: + - 2.6 + - 2.7 + - 3.2 + - 3.6 + +env: + - LIBVIRT=3D1.2.0 EXT=3Dgz + - LIBVIRT=3D2.0.0 EXT=3Dxz + - LIBVIRT=3D3.6.0 EXT=3Dxz + +install: + - sudo apt-get -qqy build-dep libvirt libxml2-dev + - sudo apt-get -qqy install curl + - pip install -r requirements-test.txt + - curl -O -s https://libvirt.org/sources/libvirt-${LIBVIRT}.tar.${EXT} + - tar -xf libvirt-${LIBVIRT}.tar.${EXT} + - pushd libvirt-${LIBVIRT} + - | + ./configure --prefix=3D`pwd`/../libvirt-vroot \ + --without-libvirtd \ + --without-esx \ + --without-vbox \ + --without-libxl \ + --without-xen \ + --without-qemu \ + --without-lxc \ + --without-hyperv \ + --without-macvtap \ + --disable-werror + - make + - make install + - popd + +script: + - LD_LIBRARY_PATH=3D`pwd`/libvirt-vroot/lib PKG_CONFIG_PATH=3D`pwd`/libv= irt-vroot/lib/pkgconfig python setup.py build sdist test + +notifications: + irc: + # The channel name "irc.oftc.net#virt" is encrypted against libvirt/li= bvirt-python + # to prevent IRC notifications from github forks. This was created usi= ng: + # $ travis encrypt -r "libvirt/libvirt-python" "irc.oftc.net#virt" + channels: + - secure: "K4JrbRpz4CHtZ1vjthVwseT8K6INJgjtZethP4DN1jOpm1uC5esbe1Q1q= JOfB92JbMcdM6DNjrVg5eyTJj35aD9UoGpTUcPMsYrhlTPHZtfAuLv/at2eB2XRmETlhiXHgI6L= izX6gTiwGW5ZHYwGChzumWxu141d/L9harNh9R6z8XH9uJpkNdOAIsJcwS56XGZ74CKsrqF5dK6= ZYPIyP+i7gPO67gEWo0oD6TiJKR908fw03ZiXarIFmLRlk4MbHywLRF0byfD0gg2Ht/tDX73+59= QXjLKo/GvQecwoU8UuuFRJlyhUfvm1JYYydnS+O7fPJvI0FWlYFY7i76aeVqkARHRpHknFueT6k= ZADOmiyMLuvdr+gWVuyIdX33vVJtDm4T1OtNMG/wy9EUZUU1vEu+gHhaRkf/O0GkMj0Hac4I14B= Gyd/Wdhto6zWojFiMEG/HRHey6l15MBQu49QyW/YMyWi/LeBWXuCUgwQ/ij5EPgsn36OxCafV9z= Mz0oXZskwX6rJGQRZsdgdwYvt2hP3muLaJbwVyT0bGlOJDJieOa/LVKOXPcQm26aGfyMuLgm0//= E9v++6W1IDKh6+BNsfTKAwTxlAvJyz6Bns3XuUJUxUz2+uQVSS6S3EwEZUJ+yHDd2F4sX5OP1L7= TWIOWFbI4vQK90ZZ7/jgiYQbwo=3D" + on_success: change + on_failure: always + email: + # The list name 'libvirt-ci@redhat.com" is encrypted against libvirt/l= ibvirt-python + # to prevent IRC notifications from github forks. This was created usi= ng: + # $ travis encrypt -r "libvirt/libvirt-python" "libvirt-ci@redhat.com" + recipients: + - secure: "l6TTLcEcXdDEldHE2NgSIdt6a0k99ug3hp2W4IlnqJWJfIk/87nysJtLN= rA0va20pPApCa3iJfMq4PUmBGiIIimTN0/KgC7tONDraogXhCbgfZp9Ejy/57TXxygSp4oum2kD= w/c5uLnfrFV/xcn1fk6hvH6CD3bVcJPOQ/mc5FSKLqN5UzwqNnMpMTtG9qxCwfXJ/Bdm9fbURfe= zC7djcYRwRfPUe3TSD0L76G2HnQnSy4RqR3KFSjQHFPnSGM5IbsokbOaFKCyp/pHOt7QomQaY7Y= APX/K9O+eP+hkkp6DGADkkumHctcgnMoyxpahf7pNKw9S8JYabH2NwREIq8whbp9Mo+R4rYO2oz= roLWHaboYs/pBLrs606ivTwOmWGRCpJdCmmKTiZNyo6MRrwiOM6x+2YHUTMOa2kVheRNzaaxMFz= HPW2kZ20bujPhfViJsRYj9flo5GJXJLyjluGZK5RjrguNJeIh8VJNBiSHW37uj7drmNBsqMad+6= 5mf/4xtGITBqhz5Spx5R9UMZbuiJvcm8GasJMMdQ+bCfuWYjF2nZvSvFEr54Ii1YrDp6FKQ8YG1= aD1/D8Z0/b3pLd/8Pn+M9yIWyO/Sto5TbSUjxBTmTStuDmtYE5uu1miYebvgJH5MovWPBegYgrf= I417kPJgCG3q/R0YcZFMKFfQyo=3D" diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 0000000..7435c54 --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,2 @@ +nose +lxml diff --git a/setup.py b/setup.py index f33ff1a..e8c498c 100755 --- a/setup.py +++ b/setup.py @@ -290,15 +290,16 @@ class my_test(Command): 'lib' + plat_specifier) =20 def find_nosetests_path(self): - paths =3D [ - "/usr/bin/nosetests-%d.%d" % (sys.version_info[0], - sys.version_info[1]), - "/usr/bin/nosetests-%d" % (sys.version_info[0]), - "/usr/bin/nosetests", + binaries =3D [ + "nosetests-%d.%d" % (sys.version_info[0], + sys.version_info[1]), + "nosetests-%d" % (sys.version_info[0]), + "nosetests", ] =20 - for path in paths: - if os.path.exists(path): + for binary in binaries: + path =3D distutils.spawn.find_executable(binary) + if path is not None: return path =20 raise Exception("Cannot find any nosetests binary") --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list