From 5fce514168b07a4d2817b4c3928891a178bb29d7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Oct 2015 17:29:01 +0200 Subject: [PATCH] travis: Patch PyQt on OS X. This is to circumvent https://github.com/Homebrew/homebrew/issues/45114 The build takes a lot longer now, but at least it works. --- .travis.yml | 4 ---- scripts/dev/ci_install.py | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index ec5ed28ba..d4b6cda51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,7 +67,3 @@ matrix: env: TESTENV=pylint - os: osx env: TESTENV=eslint - # https://github.com/Homebrew/homebrew/issues/45114 - allow_failures: - - os: osx - env: TESTENV=py35 diff --git a/scripts/dev/ci_install.py b/scripts/dev/ci_install.py index a83f93241..790c0361b 100644 --- a/scripts/dev/ci_install.py +++ b/scripts/dev/ci_install.py @@ -117,11 +117,20 @@ elif TRAVIS_OS == 'osx': print("brew update...") brew(['update'], silent=True) + # https://github.com/Homebrew/homebrew/issues/45114 + print("Patching PyQt formula...") + brew_path = subprocess.check_output(['brew', '--prefix']).strip() + pyqt_file = os.path.join(brew_path, 'Library', 'Formula', 'pyqt5.rb') + os.remove(pyqt_file) + urllib.urlretrieve( + 'https://raw.githubusercontent.com/UniqMartin/homebrew/023a20a7959680952d166beca66d2995439d4540/Library/Formula/pyqt5.rb', + pyqt_file) + print("Installing packages...") - pkgs = ['python3'] + brew(['install', 'python3']) if INSTALL_PYQT: - pkgs.append('pyqt5') - brew(['install'] + pkgs) + brew(['install', 'qt5', 'sip']) + brew(['install', 'pyqt5', '--build-from-source']) print("Installing tox...") subprocess.check_call(['sudo', 'pip3', 'install', 'tox'])