diff --git a/recipes/climlab/build.sh b/recipes/climlab/build.sh new file mode 100644 index 0000000000000..72998a317e73c --- /dev/null +++ b/recipes/climlab/build.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Based on conda-forge recipe for scipy +export LIBRARY_PATH="${PREFIX}/lib" +export C_INCLUDE_PATH="${PREFIX}/include" +export CPLUS_INCLUDE_PATH="${PREFIX}/include" + +# Depending on our platform, shared libraries end with either .so or .dylib +if [[ `uname` == 'Darwin' ]]; then + # Also, included a workaround so that `-stdlib=c++` doesn't go to + # `gfortran` and cause problems. + # + # https://github.com/conda-forge/toolchain-feedstock/pull/8 + export CFLAGS="${CFLAGS} -stdlib=libc++ -lc++" + export LDFLAGS="-headerpad_max_install_names -undefined dynamic_lookup -bundle -Wl,-search_paths_first -lc++" +else + unset LDFLAGS +fi + +$PYTHON setup.py install --single-version-externally-managed --record=record.txt diff --git a/recipes/climlab/meta.yaml b/recipes/climlab/meta.yaml new file mode 100644 index 0000000000000..a40242eed945f --- /dev/null +++ b/recipes/climlab/meta.yaml @@ -0,0 +1,54 @@ +{% set name = "climlab" %} +{% set version = "0.5.5" %} +{% set sha256 = "c2b55061f1600829d117286299051880571d56541e9efb0a9db4f7686d75c511" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + fn: {{ name }}-{{ version }}.tar.gz + url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz + sha256: {{ sha256 }} + +build: + number: 0 + skip: true # [win or not py2k] + +requirements: + build: + - toolchain + - gcc # [osx] + - python + - setuptools + - libgfortran # [linux] + - numpy x.x + + run: + - python 2.7* + - numpy x.x + - scipy + - netcdf4 + - pytest + - libgfortran + +test: + requires: + - pytest + imports: + - climlab + commands: + - pytest -v --pyargs climlab.tests.test_rrtm + +about: + home: https://github.com/brian-rose/climlab + license: MIT + license_family: MIT + license_file: LICENSE + summary: Python package for process-oriented climate modeling + doc_url: http://climlab.readthedocs.io/ + dev_url: https://github.com/brian-rose/climlab + +extra: + recipe-maintainers: + - brian-rose diff --git a/recipes/climlab/yum_requirements.txt b/recipes/climlab/yum_requirements.txt new file mode 100644 index 0000000000000..02ab7b0a15d13 --- /dev/null +++ b/recipes/climlab/yum_requirements.txt @@ -0,0 +1 @@ +devtoolset-2-gcc-gfortran