Commit b9563764 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

MNT,CI: fslpy is now on conda-forge

parent 8568a4af
#!/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
#!/usr/bin/env bash
set -e
rsync -rv dist/conda-bld/ --exclude 'repodata*' --exclude "*json" "condadeploy:"
ssh condaindex
python:
- 3.6
\ No newline at end of file
{% 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
if [ -e ${FSLDIR}/etc/fslconf/requestFSLpythonLink.sh ]; then
$FSLDIR/etc/fslconf/requestFSLpythonLink.sh atlasquery atlasq imcp immv imglob extract_noise
fi
if [ -e ${FSLDIR}/etc/fslconf/requestFSLpythonUnlink.sh ]; then
$FSLDIR/etc/fslconf/requestFSLpythonUnlink.sh atlasquery atlasq imcp immv imglob
fi
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment