From nobody Sun Apr 28 17:19:37 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1520252348805442.0311118140818; Mon, 5 Mar 2018 04:19:08 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4CE2D5F7B8; Mon, 5 Mar 2018 12:19:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A14A061F20; Mon, 5 Mar 2018 12:19:06 +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 C0C5C18033EB; Mon, 5 Mar 2018 12:19:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w25CJ4kI017576 for ; Mon, 5 Mar 2018 07:19:04 -0500 Received: by smtp.corp.redhat.com (Postfix) id 132BD2024CA9; Mon, 5 Mar 2018 12:19:04 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98A34202660C; Mon, 5 Mar 2018 12:19:03 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 5 Mar 2018 12:19:02 +0000 Message-Id: <20180305121902.20647-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] travis: force install of python2 into $PATH on macOS 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: , Content-Type: text/plain; charset="utf-8" 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 05 Mar 2018 12:19:07 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 The homebrew formula's ignored Python PEP-0394 recommendations and changed the plain python binary in /usr/local/bin to point to Python 3 instead of Python 2. Python 2 is not even installed into a location that is in $PATH by default anymore. The homebrew packages print a message to stderr claiming to provide a way to fix this [quote] This formula installs a python2 executable to /usr/local/opt/python@2/bin If you wish to have this formula's python executable in your PATH then add the following to ~/.bash_profile: export PATH=3D"/usr/local/opt/python@2/libexec/bin:$PATH" [/quote] When trying to update $PATH are suggested we find out this message is a lie and /usr/local/opt/python@2 does not even exist, instead Python seems to end up in /usr/local/Cellar/python@2/2.7.14_1 Rather than hardcoding this version specific directory in our travis config, we change to run "brew link --force python@2", to make it create symlinks in /usr/local/bin for the python2 binary. The original change triggering this problem was https://github.com/Homebrew/homebrew-core/pull/24604#issue-171653084 There are countless bug reports against homebrew-core that are closed without fixes, so it seems they are determined to ignore the Python PEP 0394 recommendations on this. Signed-off-by: Daniel P. Berrang=C3=A9 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 44f680ad07..699e4bf33a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,7 +97,7 @@ env: - VIR_TEST_DEBUG=3D1 =20 before_install: - - if [ "$TRAVIS_OS_NAME" =3D=3D "osx" ]; then brew update && brew upgrad= e && brew install rpcgen yajl xz; fi + - if [ "$TRAVIS_OS_NAME" =3D=3D "osx" ]; then brew update && brew upgrad= e && brew install rpcgen yajl xz && brew link --force python@2 ; fi =20 before_script: - ./autogen.sh --prefix=3D$(pwd)/install-root --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list