From 154cb9890f80fc1bc1545302903a6f9f9c58a095 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Thu, 19 Mar 2020 16:33:51 +0000 Subject: [PATCH 01/12] Support downloading from Github --- omego/artifacts.py | 55 +++++++++++++++++++++++++++++++++++++++++++++- omego/env.py | 5 +++++ 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/omego/artifacts.py b/omego/artifacts.py index 999890f..a8c85a1 100644 --- a/omego/artifacts.py +++ b/omego/artifacts.py @@ -8,6 +8,7 @@ from builtins import str from past.builtins import basestring from builtins import object +import json import os import logging @@ -51,7 +52,9 @@ def __init__(self, args): args.ci = 'https://ci.openmicroscopy.org' if not args.branch: args.branch = 'latest' - if args.build or re.match(r'[A-Za-z]\w+-\w+', args.branch): + if args.github: + self.artifacts = GithubArtifacts(args) + elif args.build or re.match(r'[A-Za-z]\w+-\w+', args.branch): self.artifacts = JenkinsArtifacts(args) elif re.match('[0-9]+|latest$', args.branch): self.artifacts = ReleaseArtifacts(args) @@ -472,6 +475,56 @@ def read_downloads(dlurl): return dl_icever +class GithubArtifacts(ArtifactsList): + """ + Fetch artifacts from GitHub releases + """ + + def __init__(self, args): + super(GithubArtifacts, self).__init__() + self.args = args + + if re.match(r'[0-9]+\.[0-9]+\.[0-9]+', args.branch): + dl_url = 'https://api.github.com/repos/%s/releases/tags/v%s' % ( + args.github, args.branch) + else: + raise ArtifactException( + 'Only GitHub tags are supported', args.branch) + + if args.ice: + raise ArtifactException( + 'Ice argument not supported for GitHub releases', args.ice) + + artifacturls = self.read_downloads(dl_url) + if len(artifacturls) <= 0: + raise AttributeError( + "No artifacts, please check the GitHUb releases page.") + self.find_artifacts(artifacturls) + + @staticmethod + def read_downloads(dlurl): + url = None + d = None + try: + url = fileutils.open_url(dlurl) + log.debug('Fetching html from %s code:%d', url.url, url.code) + if url.code != 200: + log.error('Failed to get HTML from %s (code %d)', + url.url, url.code) + raise Stop( + 20, 'Downloads page failed, is the version correct?') + + d = json.load(url) + except HTTPError as e: + log.error('Failed to get HTML from %s (%s)', dlurl, e) + raise Stop(20, 'Downloads page failed, is the version correct?') + finally: + if url: + url.close() + + return [a['browser_download_url'] for a in d['assets']] + + class DownloadCommand(Command): """ Download an OMERO artifact from either a downloads or a Continuous diff --git a/omego/env.py b/omego/env.py index 23b9bfd..d6b7ecf 100644 --- a/omego/env.py +++ b/omego/env.py @@ -131,6 +131,11 @@ def __init__(self, parser): " DOWNLOADURL/omero//artifacts. Default: " "http://downloads.openmicroscopy.org") + Add(group, "github", "", + help="GitHub repository containing release artifacts in form " + "'org/repository', if set this will override all other artifact " + "sources, default disabled") + Add(group, "ice", "", help="Ice version, default is the latest (release only)") From 8899b9b2be6d5f06121113073f30baaca78835cc Mon Sep 17 00:00:00 2001 From: Simon Li Date: Thu, 19 Mar 2020 17:50:58 +0000 Subject: [PATCH 02/12] Test downloading from Github --- test/integration/test_download.py | 21 +++++++++++++ test/unit/test_artifacts.py | 51 ++++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 1 deletion(-) diff --git a/test/integration/test_download.py b/test/integration/test_download.py index fb7e7fd..c7d2c68 100644 --- a/test/integration/test_download.py +++ b/test/integration/test_download.py @@ -108,6 +108,27 @@ def testDownloadBuildNumber(self): assert 'No artifacts' in exc.value.args[0] +class TestDownloadGithub(Downloader): + + def setup_class(self): + self.artifact = 'insight' + + def testDownloadGithub(self, tmpdir): + with tmpdir.as_cwd(): + self.download( + '--release', '5.5.8', + '--github', 'ome/omero-insight', + '--sym', 'auto') + files = tmpdir.listdir() + assert len(files) == 3 + print([f.basename for f in files]) + assert sorted(f.basename for f in files) == [ + 'OMERO.insight', + 'OMERO.insight-5.5.8', + 'OMERO.insight-5.5.8.zip', + ] + + class TestDownloadBioFormats(Downloader): def setup_class(self): diff --git a/test/unit/test_artifacts.py b/test/unit/test_artifacts.py index 2b985b8..95542a9 100644 --- a/test/unit/test_artifacts.py +++ b/test/unit/test_artifacts.py @@ -22,11 +22,17 @@ from builtins import str from builtins import object import pytest +import json from mox3 import mox from yaclifw.framework import Stop from omego.artifacts import ArtifactException, ArtifactsList -from omego.artifacts import Artifacts, JenkinsArtifacts, ReleaseArtifacts +from omego.artifacts import ( + Artifacts, + GithubArtifacts, + JenkinsArtifacts, + ReleaseArtifacts, +) # Import whatever XML module was imported in omego.artifacts to avoid dealing # with different versions from omego.artifacts import XML @@ -153,6 +159,23 @@ def close(self): pass +class MockGithubUrl(object): + pageurl = 'https://api.github.com/repos/ome/example/releases/tags/v0.0.0' + artifact_url = ('https://github.com/ome/example/releases/download/v0.0.0/' + 'OMERO.example-0.0.0.zip') + page_dict = {'assets': [{'browser_download_url': artifact_url}]} + + def __init__(self): + self.code = 200 + self.url = self.pageurl + + def read(self): + return json.dumps(self.page_dict) + + def close(self): + pass + + class Args(object): def __init__(self, matrix): if matrix: @@ -173,6 +196,7 @@ def __init__(self, matrix): self.branch = 'TEST-build' self.downloadurl = MockDownloadUrl.downloadurl self.sym = None + self.github = None class MoxBase(object): @@ -305,6 +329,31 @@ def test_read_downloads(self): self.mox.VerifyAll() +class TestGithubArtifacts(MoxBase): + + def test_init(self): + self.mox.StubOutWithMock(fileutils, 'open_url') + fileutils.open_url(MockGithubUrl.pageurl).AndReturn( + MockGithubUrl()) + self.mox.ReplayAll() + + args = Args(False) + args.branch = '0.0.0' + args.github = 'ome/example' + a = GithubArtifacts(args) + assert a.get('example') == MockGithubUrl.artifact_url + self.mox.VerifyAll() + + def test_nottag(self): + args = Args(False) + args.branch = 'latest' + args.github = 'ome/example' + with pytest.raises(ArtifactException) as exc: + GithubArtifacts(args) + assert exc.value.args[0] == 'Only GitHub tags are supported' + self.mox.VerifyAll() + + class TestArtifacts(MoxBase): class MockArtifacts(Artifacts): From fed5375d36e3138ff606bbe01ca85c324aa11c84 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Thu, 19 Mar 2020 18:06:56 +0000 Subject: [PATCH 03/12] Fix testDownloadRelease (py artifact no longer exists) --- test/integration/test_download.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/test/integration/test_download.py b/test/integration/test_download.py index c7d2c68..6042d15 100644 --- a/test/integration/test_download.py +++ b/test/integration/test_download.py @@ -88,12 +88,6 @@ def testDownloadSym(self, tmpdir): assert sym2 == (old_div(tmpdir, 'custom.sym')) assert sym2.isdir() - def testDownloadRelease(self, tmpdir): - with tmpdir.as_cwd(): - self.download('--release', 'latest', '--ice', self.ice) - files = tmpdir.listdir() - assert len(files) == 2 - def testDownloadNonExistingArtifact(self): with pytest.raises(AttributeError): self.download('-n', '--release', '5.3', '--ice', '3.3') @@ -108,6 +102,19 @@ def testDownloadBuildNumber(self): assert 'No artifacts' in exc.value.args[0] +class TestDownloadRelease(Downloader): + + def setup_class(self): + # python artifact no longer exists + self.artifact = 'apidoc' + + def testDownloadRelease(self, tmpdir): + with tmpdir.as_cwd(): + self.download('--release', 'latest', '--ice', '3.6') + files = tmpdir.listdir() + assert len(files) == 2 + + class TestDownloadGithub(Downloader): def setup_class(self): From ae0dacdcc5dcd9257cc5e87a45b32e2db40556bb Mon Sep 17 00:00:00 2001 From: Simon Li Date: Thu, 19 Mar 2020 18:23:52 +0000 Subject: [PATCH 04/12] Github typo --- omego/artifacts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omego/artifacts.py b/omego/artifacts.py index a8c85a1..afb7796 100644 --- a/omego/artifacts.py +++ b/omego/artifacts.py @@ -498,7 +498,7 @@ def __init__(self, args): artifacturls = self.read_downloads(dl_url) if len(artifacturls) <= 0: raise AttributeError( - "No artifacts, please check the GitHUb releases page.") + "No artifacts, please check the GitHub releases page.") self.find_artifacts(artifacturls) @staticmethod From 44fb7a41ead609fd1800469a678f4242d8b2c849 Mon Sep 17 00:00:00 2001 From: Sebastien Besson Date: Fri, 20 Mar 2020 15:57:39 +0000 Subject: [PATCH 05/12] Use GitHub releases for Travis CI --- travis-build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/travis-build b/travis-build index 2efd948..2368fd3 100755 --- a/travis-build +++ b/travis-build @@ -24,7 +24,7 @@ fi #Install a new server without web #Tests rely on a non-zero error code being returned on failure if [ $TEST = install ]; then - omego install --initdb --dbhost localhost --dbname omero --prestartfile $HOME/config.omero -v --release 5.3.5 --ice 3.6 --no-web $OMEGO_OMERO_PYTHON + omego install --github ome/openmicroscopy --initdb --dbhost localhost --dbname omero --prestartfile $HOME/config.omero -v --release 5.3.5 --ice 3.6 --no-web $OMEGO_OMERO_PYTHON # Should return 0 DB_UPTODATE omego db upgrade -n --dbhost localhost --dbname omero --serverdir OMERO.server-5.3.5-ice36-b73 $OMEGO_OMERO_PYTHON @@ -40,7 +40,7 @@ fi #Test a multistage DB upgrade (5.3 -> 5.4) as part of the server upgrade if [ $TEST = upgrade ]; then - omego download --release 5.3 --ice 3.6 server + omego download --github ome/openmicroscopy --release 5.3 --ice 3.6 server ln -s OMERO.server-5.3.5-ice36-b73 OMERO.server; # Should return 3 DB_INIT_NEEDED @@ -56,7 +56,7 @@ if [ $TEST = upgrade ]; then # Should return 0 DB_UPTODATE omego db upgrade -n --serverdir OMERO.server $OMEGO_OMERO_PYTHON - omego download --release 5.5 --ice 3.6 server --sym download-server-50 + omego download --github ome/openmicroscopy --release 5.5 --ice 3.6 server --sym download-server-50 # Should return 2 DB_UPGRADE_NEEDED RC=0; omego db upgrade -n --dbname omero --serverdir download-server-50 $OMEGO_OMERO_PYTHON || RC=$? From b924b1ad2d464b3dcec84353fc69993f271c6150 Mon Sep 17 00:00:00 2001 From: Sebastien Besson Date: Mon, 23 Mar 2020 09:04:07 +0000 Subject: [PATCH 06/12] Do not mix --github and --ice --- travis-build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/travis-build b/travis-build index 2368fd3..8cafc0c 100755 --- a/travis-build +++ b/travis-build @@ -24,7 +24,7 @@ fi #Install a new server without web #Tests rely on a non-zero error code being returned on failure if [ $TEST = install ]; then - omego install --github ome/openmicroscopy --initdb --dbhost localhost --dbname omero --prestartfile $HOME/config.omero -v --release 5.3.5 --ice 3.6 --no-web $OMEGO_OMERO_PYTHON + omego install --github ome/openmicroscopy --initdb --dbhost localhost --dbname omero --prestartfile $HOME/config.omero -v --release 5.3.5 --no-web $OMEGO_OMERO_PYTHON # Should return 0 DB_UPTODATE omego db upgrade -n --dbhost localhost --dbname omero --serverdir OMERO.server-5.3.5-ice36-b73 $OMEGO_OMERO_PYTHON @@ -56,14 +56,14 @@ if [ $TEST = upgrade ]; then # Should return 0 DB_UPTODATE omego db upgrade -n --serverdir OMERO.server $OMEGO_OMERO_PYTHON - omego download --github ome/openmicroscopy --release 5.5 --ice 3.6 server --sym download-server-50 + omego download --github ome/openmicroscopy --release 5.5 server --sym download-server-50 # Should return 2 DB_UPGRADE_NEEDED RC=0; omego db upgrade -n --dbname omero --serverdir download-server-50 $OMEGO_OMERO_PYTHON || RC=$? test $RC -eq 2 # Note this should use the already downloaded zip from the previous step - omego install --upgrade --managedb --release=5.5 --ice 3.6 --no-web $OMEGO_OMERO_PYTHON + omego install --github ome/openmicroscopy --upgrade --managedb --release=5.5 --no-web $OMEGO_OMERO_PYTHON # Should return 0 DB_UPTODATE omego db upgrade -n --serverdir OMERO.server $OMEGO_OMERO_PYTHON From a5a26088728256c5dab7db08326c3507e01bc75a Mon Sep 17 00:00:00 2001 From: Simon Li Date: Mon, 12 Oct 2020 19:30:56 +0100 Subject: [PATCH 07/12] Use full tags for travis tests so GitHub downloads work --- travis-build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/travis-build b/travis-build index 8cafc0c..c18d28f 100755 --- a/travis-build +++ b/travis-build @@ -40,7 +40,7 @@ fi #Test a multistage DB upgrade (5.3 -> 5.4) as part of the server upgrade if [ $TEST = upgrade ]; then - omego download --github ome/openmicroscopy --release 5.3 --ice 3.6 server + omego download --github ome/openmicroscopy --release 5.3.5 --ice 3.6 server ln -s OMERO.server-5.3.5-ice36-b73 OMERO.server; # Should return 3 DB_INIT_NEEDED @@ -56,14 +56,14 @@ if [ $TEST = upgrade ]; then # Should return 0 DB_UPTODATE omego db upgrade -n --serverdir OMERO.server $OMEGO_OMERO_PYTHON - omego download --github ome/openmicroscopy --release 5.5 server --sym download-server-50 + omego download --github ome/openmicroscopy --release 5.5.1 server --sym download-server-50 # Should return 2 DB_UPGRADE_NEEDED RC=0; omego db upgrade -n --dbname omero --serverdir download-server-50 $OMEGO_OMERO_PYTHON || RC=$? test $RC -eq 2 # Note this should use the already downloaded zip from the previous step - omego install --github ome/openmicroscopy --upgrade --managedb --release=5.5 --no-web $OMEGO_OMERO_PYTHON + omego install --github ome/openmicroscopy --upgrade --managedb --release=5.5.1 --no-web $OMEGO_OMERO_PYTHON # Should return 0 DB_UPTODATE omego db upgrade -n --serverdir OMERO.server $OMEGO_OMERO_PYTHON From c269e5632435b52bb34aa44b192ac1c2d796917c Mon Sep 17 00:00:00 2001 From: Simon Li Date: Mon, 12 Oct 2020 19:45:05 +0100 Subject: [PATCH 08/12] Temporarily pin flake8 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 91bf768..97b2f0c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ before_install: # This will need to be reviewed when the issue above is fixed - export PATH=/usr/bin/:$PATH - ./travis-install - - pip install flake8 tox + - pip install 'flake8<3.8' tox - flake8 -v . before_script: From 211b965cb5fd04f0ba328f889c2d955c58dec1bf Mon Sep 17 00:00:00 2001 From: Simon Li Date: Tue, 13 Oct 2020 09:28:23 +0100 Subject: [PATCH 09/12] Travis: try a more recent icepy build --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 5b11dd3..1d6042e 100644 --- a/tox.ini +++ b/tox.ini @@ -22,14 +22,14 @@ basepython = python2.7 platform = linux.* deps = setuptools>=40.0 - https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.1.0/zeroc_ice-3.6.5-cp27-cp27mu-manylinux2010_x86_64.whl + https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.2.0/zeroc_ice-3.6.5-cp27-cp27mu-manylinux2010_x86_64.whl [testenv:py36travis] basepython = python3.6 platform = linux.* deps = setuptools>=40.0 - https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.1.0/zeroc_ice-3.6.5-cp36-cp36m-manylinux2010_x86_64.whl + https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.3.0/zeroc_ice-3.6.5-cp36-cp36m-manylinux2014_x86_64.whl ; [testenv:py27] ; basepython = /CONDA/envs/tox-py27/bin/python From ec35ce810204c826e04a35981b6f69feab2ef647 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Tue, 13 Oct 2020 10:54:02 +0100 Subject: [PATCH 10/12] Travis try bionic and pip>=20.2.3 --- .travis.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97b2f0c..4276e89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: "2.7" -dist: xenial +dist: bionic # This (sudo: false) is needed to "run on container-based infrastructure" on # which cache: is available diff --git a/tox.ini b/tox.ini index 1d6042e..5b58b57 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ envlist = py27, py36 # https://tox.readthedocs.io/en/latest/config.html#conf-requires # Ensure pip is new so we can install manylinux wheel -requires = pip >= 19.0.0 +requires = pip >= 20.2.3 virtualenv >= 16.0.0 [testenv] From 6176e606cd056add73aa22f4da0f676b26fd805a Mon Sep 17 00:00:00 2001 From: Simon Li Date: Tue, 13 Oct 2020 14:33:35 +0100 Subject: [PATCH 11/12] Travis try ome/zeroc-ice-ubuntu1804 --- .travis.yml | 2 +- travis-install | 54 +++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4276e89..5957849 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ before_install: # see https://github.com/travis-ci/travis-ci/issues/8048 # Changing the value for sudo will also need to be reviewed at the same time # This will need to be reviewed when the issue above is fixed - - export PATH=/usr/bin/:$PATH + - if [ "${TRAVIS_PYTHON_VERSION:-}" = "2.7" ]; then export PATH=/usr/bin/:$PATH; fi - ./travis-install - pip install 'flake8<3.8' tox - flake8 -v . diff --git a/travis-install b/travis-install index 93b2fa5..af83509 100755 --- a/travis-install +++ b/travis-install @@ -4,20 +4,50 @@ set -eux sudo apt-get update sudo apt-get -y install python-{pillow,numpy,psutil} -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 5E6DA83306132997 -sudo apt-add-repository "deb http://zeroc.com/download/apt/ubuntu`lsb_release -rs` stable main" -sudo apt-get update -sudo apt-get -y install zeroc-ice-all-runtime zeroc-ice-all-dev + +pushd /opt +curl -sfL https://github.com/ome/zeroc-ice-ubuntu1804/releases/download/0.3.0/ice-3.6.5-0.3.0-ubuntu1804-amd64.tar.gz | sudo tar -zxf - +popd +sudo ln -s /opt/ice-3.6.5-0.3.0/bin/* /usr/local/bin/ # The distribution Python 2.7 is still present when Travis is setup to use 3.6 # so we can use it to run OMERO + +# First figure out which executables exist +set +e +echo $PATH + +python --version +python2 --version +python2.7 --version +python3 --version +python3.6 --version + +python3 -mpip --version +python3.6 -mpip --version + +pip --version +pip2 --version +pip2.7 --version +pip3 --version +pip3.6 --version + +which python +which python2 +which python2.7 +which python3 +which python3.6 + +which pip +which pip2 +which pip2.7 +which pip3 +which pip3.6 +set -e + if [ "$TRAVIS_PYTHON_VERSION" = "3.6" ]; then - pip install https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.1.0/zeroc_ice-3.6.5-cp36-cp36m-manylinux2010_x86_64.whl - sudo pip2.7 install https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.1.0/zeroc_ice-3.6.5-cp27-cp27mu-manylinux2010_x86_64.whl - - python3.6 -c 'import Ice; print(Ice.stringVersion())' - python2.7 -c 'import Ice; print(Ice.stringVersion())' -else - sudo pip install https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.1.0/zeroc_ice-3.6.5-cp27-cp27mu-manylinux2010_x86_64.whl - python -c 'import Ice; print(Ice.stringVersion())' + pip install https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.3.0/zeroc_ice-3.6.5-cp36-cp36m-manylinux2014_x86_64.whl + python3 -c 'import Ice; print(Ice.stringVersion())' fi +sudo pip2.7 install https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.2.0/zeroc_ice-3.6.5-cp27-cp27mu-manylinux2010_x86_64.whl +python2.7 -c 'import Ice; print(Ice.stringVersion())' From bc915929753f06d54695ab1de3041f5dbce28483 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Tue, 13 Oct 2020 15:23:26 +0100 Subject: [PATCH 12/12] More faffing with PATH --- .travis.yml | 1 - travis-install | 34 +++------------------------------- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5957849..ee87639 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,6 @@ before_install: # see https://github.com/travis-ci/travis-ci/issues/8048 # Changing the value for sudo will also need to be reviewed at the same time # This will need to be reviewed when the issue above is fixed - - if [ "${TRAVIS_PYTHON_VERSION:-}" = "2.7" ]; then export PATH=/usr/bin/:$PATH; fi - ./travis-install - pip install 'flake8<3.8' tox - flake8 -v . diff --git a/travis-install b/travis-install index af83509..e1d00c3 100755 --- a/travis-install +++ b/travis-install @@ -13,37 +13,9 @@ sudo ln -s /opt/ice-3.6.5-0.3.0/bin/* /usr/local/bin/ # The distribution Python 2.7 is still present when Travis is setup to use 3.6 # so we can use it to run OMERO -# First figure out which executables exist -set +e -echo $PATH - -python --version -python2 --version -python2.7 --version -python3 --version -python3.6 --version - -python3 -mpip --version -python3.6 -mpip --version - -pip --version -pip2 --version -pip2.7 --version -pip3 --version -pip3.6 --version - -which python -which python2 -which python2.7 -which python3 -which python3.6 - -which pip -which pip2 -which pip2.7 -which pip3 -which pip3.6 -set -e +if [ "${TRAVIS_PYTHON_VERSION:-}" = "2.7" ]; then + export PATH=/usr/bin/:$PATH +fi if [ "$TRAVIS_PYTHON_VERSION" = "3.6" ]; then pip install https://github.com/ome/zeroc-ice-py-manylinux/releases/download/0.3.0/zeroc_ice-3.6.5-cp36-cp36m-manylinux2014_x86_64.whl