Skip to content

Commit

Permalink
Initial feedstock commit with conda-smithy 2.3.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis-CI on github.com/conda-forge/staged-recipes committed Jul 14, 2017
0 parents commit 09285a8
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* text=auto

meta.yaml text eol=lf
build.sh text eol=lf
bld.bat text eol=crlf
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pyc

build_artefacts
13 changes: 13 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
BSD 3-clause license
Copyright (c) 2015-2017, conda-forge
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
103 changes: 103 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
About magics
============

Home: https://software.ecmwf.int/wiki/display/MAGP/

Package license: Apache 2.0

Feedstock license: BSD 3-Clause

Summary: ECMWF's Meteorological plotting software



Current build status
====================

Linux: ![](https://cdn.rawgit.com/conda-forge/conda-smithy/90845bba35bec53edac7a16638aa4d77217a3713/conda_smithy/static/disabled.svg)
OSX: ![](https://cdn.rawgit.com/conda-forge/conda-smithy/90845bba35bec53edac7a16638aa4d77217a3713/conda_smithy/static/disabled.svg)
Windows: ![](https://cdn.rawgit.com/conda-forge/conda-smithy/90845bba35bec53edac7a16638aa4d77217a3713/conda_smithy/static/disabled.svg)

Current release info
====================
Version: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/magics/badges/version.svg)](https://anaconda.org/conda-forge/magics)
Downloads: [![Anaconda-Server Badge](https://anaconda.org/conda-forge/magics/badges/downloads.svg)](https://anaconda.org/conda-forge/magics)

Installing magics
=================

Installing `magics` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:

```
conda config --add channels conda-forge
```

Once the `conda-forge` channel has been enabled, `magics` can be installed with:

```
conda install magics
```

It is possible to list all of the versions of `magics` available on your platform with:

```
conda search magics --channel conda-forge
```


About conda-forge
=================

conda-forge is a community-led conda channel of installable packages.
In order to provide high-quality builds, the process has been automated into the
conda-forge GitHub organization. The conda-forge organization contains one repository
for each of the installable packages. Such a repository is known as a *feedstock*.

A feedstock is made up of a conda recipe (the instructions on what and how to build
the package) and the necessary configurations for automatic building using freely
available continuous integration services. Thanks to the awesome service provided by
[CircleCI](https://circleci.com/), [AppVeyor](http://www.appveyor.com/)
and [TravisCI](https://travis-ci.org/) it is possible to build and upload installable
packages to the [conda-forge](https://anaconda.org/conda-forge)
[Anaconda-Cloud](http://docs.anaconda.org/) channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance
[conda-smithy](http://github.com/conda-forge/conda-smithy) has been developed.
Using the ``conda-forge.yml`` within this repository, it is possible to re-render all of
this feedstock's supporting files (e.g. the CI configuration files) with ``conda smithy rerender``.


Terminology
===========

**feedstock** - the conda recipe (raw material), supporting scripts and CI configuration.

**conda-smithy** - the tool which helps orchestrate the feedstock.
Its primary use is in the construction of the CI ``.yml`` files
and simplify the management of *many* feedstocks.

**conda-forge** - the place where the feedstock and smithy live and work to
produce the finished article (built conda distributions)


Updating magics-feedstock
=========================

If you would like to improve the magics recipe or build a new
package version, please fork this repository and submit a PR. Upon submission,
your changes will be run on the appropriate platforms to give the reviewer an
opportunity to confirm that the changes result in a successful build. Once
merged, the recipe will be re-built and uploaded automatically to the
`conda-forge` channel, whereupon the built conda packages will be available for
everybody to install and use from the `conda-forge` channel.
Note that all branches in the conda-forge/magics-feedstock are
immediately built and any created packages are uploaded, so PRs should be based
on branches in forks and branches in the main repository should only be used to
build distinct package versions.

In order to produce a uniquely identifiable distribution:
* If the version of a package **is not** being increased, please add or increase
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string).
* If the version of a package **is** being increased, please remember to return
the [``build/number``](http://conda.pydata.org/docs/building/meta-yaml.html#build-number-and-string)
back to 0.
9 changes: 9 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
general:
branches:
ignore:
- /.*/

test:
override:
# The Circle-CI build should not be active, but if this is not true for some reason, do a fast finish.
- exit 0
1 change: 1 addition & 0 deletions conda-forge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
57 changes: 57 additions & 0 deletions recipe/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash

set -e # Abort on error.

export PING_SLEEP=30s
export WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export BUILD_OUTPUT=$WORKDIR/build.out

touch $BUILD_OUTPUT

dump_output() {
echo Tailing the last 500 lines of output:
tail -500 $BUILD_OUTPUT
}
error_handler() {
echo ERROR: An error was encountered with the build.
dump_output
exit 1
}

# If an error occurs, run our error handler to output a tail of the build.
trap 'error_handler' ERR

# Set up a repeating loop to send some output to Travis.
bash -c "while true; do echo \$(date) - building ...; sleep $PING_SLEEP; done" &
PING_LOOP_PID=$!

if [[ $(uname) == Darwin ]]; then
export LIBRARY_SEARCH_VAR=DYLD_FALLBACK_LIBRARY_PATH
elif [[ $(uname) == Linux ]]; then
export LIBRARY_SEARCH_VAR=LD_LIBRARY_PATH
fi

export PYTHON="$PYTHON"
export PYTHON_LDFLAGS="$PREFIX/lib"
export LDFLAGS="$LDFLAGS -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib"
export CFLAGS="$CFLAGS -fPIC -I$PREFIX/include"

src_dir="$(pwd)"
mkdir ../build
cd ../build
cmake $src_dir \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DENABLE_PYTHON=1 \
-DENABLE_FORTRAN=0 \
-DENABLE_ECCODES=1

make -j $CPU_COUNT >> $BUILD_OUTPUT 2>&1
eval ${LIBRARY_SEARCH_VAR}=$PREFIX/lib
ctest -j $CPU_COUNT >> $BUILD_OUTPUT 2>&1
make install >> $BUILD_OUTPUT 2>&1

# The build finished without returning an error so dump a tail of the output.
dump_output

# Nicely terminate the ping output loop.
kill $PING_LOOP_PID
47 changes: 47 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% set version = "2.34.1" %}

package:
name: magics
version: {{ version }}

source:
fn: Magics-{{ version }}-Source.tar.gz
url: https://software.ecmwf.int/wiki/download/attachments/3473464/Magics-{{ version }}-Source.tar.gz
sha256: 8df27f8f262ebc32a61f8696df15a7b4a6e4203b2a8e53fe7aa13caa1c4e3fa4

build:
number: 0
skip: True # [win or not py27]
detect_binary_files_with_prefix: true

requirements:
build:
- cmake
- swig
- boost 1.64.*
- proj.4 4.9.3
- python-eccodes
- python
# ecBuild fails to find the C++ bindings: the library name is libnetcdf_c++4
# - netcdf-cxx4
run:
- proj.4 4.9.3
- python-eccodes
- python
# ecBuild fails to find the C++ bindings: the library name is libnetcdf_c++4
# - netcdf-cxx4

test:
commands:
- metgram

about:
home: https://software.ecmwf.int/wiki/display/MAGP/
license: Apache 2.0
license_file: LICENSE
summary: ECMWF's Meteorological plotting software

extra:
recipe-maintainers:
- kynan
- carletes

0 comments on commit 09285a8

Please sign in to comment.