diff --git a/.travis.yml b/.travis.yml index b8a0763..4cd1d51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ os: - linux - osx +pre_install: + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash -x macos_ci_setup.sh; fi install: - cd ./conda_pkg - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash -x macos_ci_setup.sh; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; else wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi diff --git a/conda_pkg/README.md b/conda_pkg/README.md index acd4b7e..6c4dd0a 100644 --- a/conda_pkg/README.md +++ b/conda_pkg/README.md @@ -1,13 +1,14 @@ -This directory contains the recipe for building a conda package for CoFFEE. +# Conda package wrapping CoFFEE project -To use/test: +To use -- with current working directory containing meta.yaml: -First create a conda build environment with the tools needed to run the `conda-build` command - -1. `conda create -n conda-build-env python=3.6` +1. `conda create -n python=3 conda-build-env conda-build anaconda-client conda-verify` 2. `conda activate conda-build-env` -3. `conda install conda-build conda-verify anaconda-client` +3. `conda-build . -c conda-forge` + +## Build Environment setup requirements (macOS) -Then run `conda-build .` from this directory (NOTE: this does not modify your `conda-build-env` -- you can reuse this environment to test conda package build process and don't have to recreate it everytime) +Ensure install of the [macOS 10.9 sdk](https://github.com/phracker/MacOSX-SDKs/releases). -1. `conda-build .` +(you can use this script but check what it does first to confirm you are happy with the modifications it will perform) +bash -x macos_ci_setup.sh diff --git a/conda_pkg/macos_ci_setup.sh b/conda_pkg/macos_ci_setup.sh index ec06293..6802b19 100644 --- a/conda_pkg/macos_ci_setup.sh +++ b/conda_pkg/macos_ci_setup.sh @@ -1,12 +1,11 @@ #!/bin/bash -x -# needed for some tests -brew install tree wget +brew install wget + +sudo mkdir -p /opt && sudo chown $(whoami) /opt && sudo chmod u+w /opt # install MacOS 10.9 sdk to /opt/MacOSX10.9.sdk ( - sudo mkdir -p /opt - sudo chmod oug+w /opt cd /opt wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz tar -xf MacOSX10.9.sdk.tar.xz