From 8adfc69cecbf8bf80672363bc517351d7d4d311f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Sat, 17 Nov 2018 04:17:24 -0500 Subject: [PATCH 1/4] Use Conda 4.4.0's new form of activation --- .appveyor.yml | 2 +- .travis.yml | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 385e913..36b9590 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -66,7 +66,7 @@ install: # Create the test environment. - cmd: conda create -y -n testenv python="%CONDA_PY%" - cmd: conda env update -n testenv --file environment_ci.yml - - cmd: activate testenv + - cmd: conda activate testenv # Skip .NET project specific build phase. build: off diff --git a/.travis.yml b/.travis.yml index 59849de..f9664db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,8 @@ install: - openssl md5 miniconda.sh | grep e1045ee415162f944b6aebfe560b8fee - bash miniconda.sh -b -p ~/miniconda - rm miniconda.sh - - source ~/miniconda/bin/activate root + - source ~/miniconda/etc/profile.d/conda.sh + - conda activate - conda config --set show_channel_urls true - conda update -y -n root --all - conda install -y -n root conda-build @@ -32,7 +33,7 @@ install: - conda remove -y --force -n testenv openssl - conda env update -n testenv --file environment_ci.yml - conda list --full-name -n testenv openssl || conda install -y -n testenv openssl - - source activate testenv + - conda activate testenv # command to run tests, e.g. python setup.py test script: @@ -44,12 +45,12 @@ script: # Report coverage after_success: - - source activate root + - conda activate - conda create -y -n dplenv python="3.5"; - conda remove -y --force -n dplenv openssl - conda env update -n dplenv --file environment_dpl.yml - conda list --full-name -n dplenv openssl || conda install -y -n dplenv openssl - - source activate dplenv + - conda activate dplenv - coveralls # Disable email notifications. From 4da1baebb4f3127411fe5515dbdf63079c09ac89 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Mon, 19 Nov 2018 10:10:43 -0500 Subject: [PATCH 2/4] Drop old `openssl` workaround This was working around an old issue with `openssl` in defaults where a post-link script that they had misbehaved when upgrading to packages in conda-forge. However this was long since fixed when Anaconda rebuilt with conda-forge packages, which did not have this script. So just drop the workaround. --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f9664db..6e85e47 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,9 +30,7 @@ install: # Create the test environment. - conda create -y -n testenv python="${PYVER}" - - conda remove -y --force -n testenv openssl - conda env update -n testenv --file environment_ci.yml - - conda list --full-name -n testenv openssl || conda install -y -n testenv openssl - conda activate testenv # command to run tests, e.g. python setup.py test From 9821989bea37c78e178490110f6db63d3e323340 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Mon, 19 Nov 2018 10:53:51 -0500 Subject: [PATCH 3/4] Pin Python version in environment It seems that `conda env update` is overriding the match specification from the previous `python` install command. To fix this, we create the environment empty and pin the `python` version in the `pinned` file. This should be respected by `conda env update`. --- .appveyor.yml | 5 +++-- .travis.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 36b9590..5ac7a9e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -64,9 +64,10 @@ install: - cmd: conda config --get # Create the test environment. - - cmd: conda create -y -n testenv python="%CONDA_PY%" - - cmd: conda env update -n testenv --file environment_ci.yml + - cmd: conda create -y -n testenv - cmd: conda activate testenv + - cmd: echo "python %CONDA_PY%.*" >> "%CONDA_PREFIX%\\conda-meta\\pinned" + - cmd: conda env update -n testenv --file environment_ci.yml # Skip .NET project specific build phase. build: off diff --git a/.travis.yml b/.travis.yml index 6e85e47..05517f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,9 +29,10 @@ install: - conda clean -tipsy # Create the test environment. - - conda create -y -n testenv python="${PYVER}" - - conda env update -n testenv --file environment_ci.yml + - conda create -y -n testenv - conda activate testenv + - echo "python ${PYVER}.*" >> "${CONDA_PREFIX}/conda-meta/pinned" + - conda env update -n testenv --file environment_ci.yml # command to run tests, e.g. python setup.py test script: From 414a91cb430dd43ed9f50f1688a56ed954e7b04f Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Mon, 19 Nov 2018 11:01:32 -0500 Subject: [PATCH 4/4] Use an older version of `wheel` for Python 3.5 Seems the current version of `wheel` does not exist as a `conda` package in either `defaults` or `conda-forge`. So downgrade a little bit to get a version of `wheel` that works across Python versions. --- environment_ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment_ci.yml b/environment_ci.yml index 6e5aec8..91f50ff 100644 --- a/environment_ci.yml +++ b/environment_ci.yml @@ -5,7 +5,7 @@ channels: dependencies: - pip==18.1 - - wheel==0.32.2 + - wheel==0.32.0 - coverage==4.5.2 - pytest==3.10.1 - cython==0.29