diff --git a/.travis.yml b/.travis.yml index 8ad0d25..0f4134a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,6 +55,7 @@ install: - which python - python setup.py sdist --quiet - pip install dist/*.tar.gz + - conda list script: # boto has issues with python3 on travisCI diff --git a/dask_ec2/salt.py b/dask_ec2/salt.py index 7072e85..549e08f 100644 --- a/dask_ec2/salt.py +++ b/dask_ec2/salt.py @@ -162,6 +162,20 @@ def __install_python_pip(): raise DaskEc2Exception("%s\nCouldn't install python-pip. Error is above (maybe try again)" % e.last_exception) + @retry(retries=3, wait=0) + def __upgrade_pip(): + cmd = "pip install --upgrade pip packaging appdirs six" + ret = master.exec_command(cmd, sudo=True) + if ret["exit_code"] != 0: + raise Exception(ret["stderr"]) + + try: + __upgrade_pip() + except RetriesExceededException as e: + raise DaskEc2Exception( + "%s\nCouldn't upgrade pip. Error is above (maybe try again)" % + e.last_exception) + @retry(retries=3, wait=0) def __install_salt_rest_api(): cmd = "pip install cherrypy" @@ -177,10 +191,10 @@ def __install_salt_rest_api(): @retry(retries=3, wait=0) def __install_pyopensll(): - cmd = "pip install PyOpenSSL" + cmd = "pip install PyOpenSSL==16.2.0" ret = master.exec_command(cmd, sudo=True) if ret["exit_code"] != 0: - raise Exception(ret["stderr"].decode('utf-8')) + raise Exception(ret["stderr"]) try: __install_pyopensll() diff --git a/environment.yml b/environment.yml index bf3824a..4a80d25 100644 --- a/environment.yml +++ b/environment.yml @@ -5,11 +5,11 @@ dependencies: - yaml - pyyaml - click - - boto3 + - boto3 ==1.4.3 - pytest - coverage - pytest-cov - pylint - pip: - - moto + - moto==0.4.30 - twine diff --git a/requirements.txt b/requirements.txt index c4988df..eac329b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ six click paramiko -boto3 +boto3==1.4.3 pyyaml # Test