conda/conda-build — pull request #8 by srossross (2014-01-22 16:45:10+00:00)
Title: Flexible meta.yaml

Ported from https://github.com/conda/conda/pull/509

This is an implementation of the conda/conda#316 issue I opened.

This is 100% backwards compatible with previous versions of conda. It should not affect any existing recipes.

### Target audience

Conda package authors that have to work with dynamic sources and automated builds.

#### meta.yaml name alternative:

Allow build script to be named `conda.yaml` or `meta.yaml` When isolated and without context `conda.yaml` is more descriptive to a user looking at a repository

#### Use Jinja Template engine

This PR enables Jinja templating of meta.yaml files.

The best place to review the code is: [metadata.py:get_contents](https://github.com/srossross/conda/blob/feature/jinja/conda/builder/metadata.py#L127) This is the main/only change for this functionality.

Also see these reference packages for examples:
* [example setuptools package](https://github.com/srossross/conda/tree/feature/jinja/example_packages/setuptools)
* [example npm package](https://github.com/srossross/conda/tree/feature/jinja/example_packages/npm)

Note that these are examples of jinja templating and existing packages will not be affected. One issue we have been having is incrementing the build number for automated jenins builds. With this PR we would only need to modify our meta.yaml files only very slightly:

Existing:
```yaml
package:
name: package
version: 1.0
build:
number: 1
```

Modified:
```yaml
package:
name: package
version: 1.0
build:
number: {{environ['JENKINS_BUILD_NUMBER']}}
```

# Benefits

1. Conda builds for most python and npm packages are reduced to one line. I think this is a huge win.
2. This is backwards compatible, no existing packages need to be modified.