conda/conda — pull request #509 by srossross (2014-01-17 02:28:41+00:00)
Title: Flexible meta.yaml

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.

### Change summary

Each of these changes are isolated and should be separable. I can resubmit this PR as this discussion progresses.

#### 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

#### Added `-p/--process-meta` argument

Conda build `-p/--process-meta` argument will output processed `meta.yaml` file to stdout.

#### Added build/script field to `meta.yaml`

1. For simple python builds it is superfluous to create a one line build.sh file. If the build/script field is given, that will be used instead of build.sh

eg:
```yaml
... snip ...
build:
script: python setup.py install
```

2. For templating, it is easier to output a single file

#### 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.