From b956376498d1303bad4cc973c0f23bf5aae545d7 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Thu, 13 Sep 2018 11:04:19 +0100
Subject: [PATCH] MNT,CI: fslpy is now on conda-forge

---
 .ci/build_conda_dist.sh        | 35 -----------------------
 .ci/deploy_conda.sh            |  6 ----
 .conda/conda_build_config.yaml |  2 --
 .conda/meta.yaml               | 47 -------------------------------
 .conda/post-link.sh            |  3 --
 .conda/pre-unlink.sh           |  3 --
 .gitlab-ci.yml                 | 51 +---------------------------------
 7 files changed, 1 insertion(+), 146 deletions(-)
 delete mode 100644 .ci/build_conda_dist.sh
 delete mode 100644 .ci/deploy_conda.sh
 delete mode 100644 .conda/conda_build_config.yaml
 delete mode 100644 .conda/meta.yaml
 delete mode 100755 .conda/post-link.sh
 delete mode 100755 .conda/pre-unlink.sh

diff --git a/.ci/build_conda_dist.sh b/.ci/build_conda_dist.sh
deleted file mode 100644
index f4d94d8fa..000000000
--- a/.ci/build_conda_dist.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-name=$1
-version=$2
-
-# add any extra channels that are needed
-for channel in $FSL_CONDA_CHANNELS; do
-    conda config  --append channels $channel
-done
-
-# make sure to update fundamental
-# packages from the default channel
-conda update  --yes -c defaults -n base conda
-conda install --yes -c defaults -n base setuptools conda-build
-
-# insert project name/version into meta.yaml
-echo "{% set name    = '$name' %}"    >  vars.txt
-echo "{% set version = '$version' %}" >> vars.txt
-cat vars.txt .conda/meta.yaml > tempfile
-mv tempfile .conda/meta.yaml
-rm vars.txt
-
-mkdir -p dist/conda-bld
-
-conda build --output-folder=dist/conda-bld .conda
-
-# Make sure package is installable
-for pyver in 2.7 3.4 3.5 3.6; do
-    conda create -y --name "test$pyver" python=$pyver
-    source activate test$pyver
-    conda install -y -c file://`pwd`/dist/conda-bld $name
-    source deactivate
-done
diff --git a/.ci/deploy_conda.sh b/.ci/deploy_conda.sh
deleted file mode 100644
index b48540c26..000000000
--- a/.ci/deploy_conda.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-
-set -e
-
-rsync -rv dist/conda-bld/ --exclude 'repodata*' --exclude "*json" "condadeploy:"
-ssh condaindex
diff --git a/.conda/conda_build_config.yaml b/.conda/conda_build_config.yaml
deleted file mode 100644
index 2d1bcb889..000000000
--- a/.conda/conda_build_config.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-python:
-   - 3.6
\ No newline at end of file
diff --git a/.conda/meta.yaml b/.conda/meta.yaml
deleted file mode 100644
index 1f2d46277..000000000
--- a/.conda/meta.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
-{% set data = load_setup_py_data() %}
-package:
-  name: fslpy
-  version: {{ data['version']}}
-
-build:
-  noarch: python
-  script: python setup.py install --single-version-externally-managed --record=record.txt
-
-source:
-  path: ../
-
-requirements:
-  build:
-    - python {{ python }}
-    - setuptools
-    {% for package in data.get('setup_requires', {}) %}
-    - {{ package.lower() }}
-    {% endfor %}
-
-  run:
-    - python
-    {% for package in data.get('install_requires', {}) %}
-    - {{ package.lower() }}
-    {% endfor %}
-
-  run_constrained:
-    {% for name, pkgs in data.get('extras_require', dict()).items() %}
-    {% for package in pkgs %}
-    - {{ package.lower() }}
-    {% endfor %}
-    {% endfor %}
-
-{% if 'test_suite' in data %}
-test:
-  requires:
-    {% for package in data.get('setup_requires', {}) %}
-    - {{ package.lower() }}
-    {% endfor %}
-  source_files:
-    - {{ data['test_suite'] }}
-  commands:
-    - python -m pytest {{ data['test_suite'] }} -m "not (fsltest or wxtest or dicomtest or meshtest or igziptest or noroottest or longtest)"
-{% endif %}
-
-about:
-  license_file: LICENSE
diff --git a/.conda/post-link.sh b/.conda/post-link.sh
deleted file mode 100755
index 466175166..000000000
--- a/.conda/post-link.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ -e ${FSLDIR}/etc/fslconf/requestFSLpythonLink.sh ]; then
-    $FSLDIR/etc/fslconf/requestFSLpythonLink.sh atlasquery atlasq imcp immv imglob extract_noise
-fi
diff --git a/.conda/pre-unlink.sh b/.conda/pre-unlink.sh
deleted file mode 100755
index f925f8295..000000000
--- a/.conda/pre-unlink.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-if [ -e ${FSLDIR}/etc/fslconf/requestFSLpythonUnlink.sh ]; then 
-    $FSLDIR/etc/fslconf/requestFSLpythonUnlink.sh atlasquery atlasq imcp immv imglob
-fi
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6633b990a..29b0ea2c7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,7 +11,7 @@
 #
 #    3. doc:    Building API documentation
 #
-#    4. build:  Building source, wheel and conda distributions
+#    4. build:  Building source and wheel distributions
 #
 #    5. deploy: Uploading the build outputs to pypi/hosting servers, and the
 #               documentation to a hosting server.
@@ -64,12 +64,6 @@ stages:
 #   - SSH_PRIVATE_KEY_DOC_DEPLOY     - private key for rsyncing documentation
 #                                      to remote host (DOC_HOST)
 #
-#   - SSH_PRIVATE_KEY_CONDA_DEPLOY   - private key for rsyncing conda builds
-#                                      to remote host (CONDA_HOST)
-#
-#   - SSH_PRIVATE_KEY_CONDA_INDEX    - private key for updating conda channel
-#                                      (on CONDA_HOST)
-#
 #   - SSH_SERVER_HOSTKEYS            - List of trusted SSH hosts
 #
 #   - DOC_HOST:                      - Username@host to upload documentation to
@@ -78,12 +72,6 @@ stages:
 #   - FSL_HOST:                      - Username@host to download FSL data from
 #                                      (e.g. "paulmc@jalapeno.fmrib.ox.ac.uk")
 #
-#   - CONDA_HOST:                    - Username@host to upload conda build to
-#                                      (e.g. "paulmc@jalapeno.fmrib.ox.ac.uk")
-#
-#   - CONDA_CHANNELS                 - List of additional conda channels to
-#                                      use for conda build.
-#
 #   - TWINE_USERNAME:                - Username to use when uploading to pypi
 #
 #   - TWINE_PASSWORD:                - Password to use when uploading to pypi
@@ -244,25 +232,6 @@ build-pypi-dist:
       - dist/*
 
 
-build-conda-dist:
-  <<: *only_releases
-  <<: *patch_version
-
-  stage: build
-  image: continuumio/miniconda3
-
-  tags:
-    - docker
-
-  script:
-   - bash ./.ci/build_conda_dist.sh fslpy "$CI_COMMIT_REF_NAME"
-
-  artifacts:
-    expire_in: 1 day
-    paths:
-      - dist/conda-bld
-
-
 ##############
 # Deploy stage
 ##############
@@ -300,21 +269,3 @@ deploy-pypi:
 
   script:
     - bash ./.ci/deploy_pypi.sh
-
-
-
-deploy-conda:
-  <<: *only_releases
-  <<: *setup_ssh
-  stage: deploy
-  when:  manual
-  image: python:3.5
-
-  tags:
-    - docker
-
-  dependencies:
-    - build-conda-dist
-
-  script:
-    - bash ./.ci/deploy_conda.sh
-- 
GitLab