{"action":"created","issue":{"url":"https://api.github.com/repos/conda/conda-build/issues/575","labels_url":"https://api.github.com/repos/conda/conda-build/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/conda/conda-build/issues/575/comments","events_url":"https://api.github.com/repos/conda/conda-build/issues/575/events","html_url":"https://github.com/conda/conda-build/pull/575","id":105398048,"number":575,"title":"Allow jinja2 templates to be located in current conda environment","user":{"login":"ukoethe","id":897680,"avatar_url":"https://avatars.githubusercontent.com/u/897680?v=3","gravatar_id":"","url":"https://api.github.com/users/ukoethe","html_url":"https://github.com/ukoethe","followers_url":"https://api.github.com/users/ukoethe/followers","following_url":"https://api.github.com/users/ukoethe/following{/other_user}","gists_url":"https://api.github.com/users/ukoethe/gists{/gist_id}","starred_url":"https://api.github.com/users/ukoethe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ukoethe/subscriptions","organizations_url":"https://api.github.com/users/ukoethe/orgs","repos_url":"https://api.github.com/users/ukoethe/repos","events_url":"https://api.github.com/users/ukoethe/events{/privacy}","received_events_url":"https://api.github.com/users/ukoethe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T14:47:07Z","updated_at":"2015-09-08T19:36:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/conda/conda-build/pulls/575","html_url":"https://github.com/conda/conda-build/pull/575","diff_url":"https://github.com/conda/conda-build/pull/575.diff","patch_url":"https://github.com/conda/conda-build/pull/575.patch"},"body":"Use case: Suppose one wants to build a set of packages with exactly identical toolset settings (same compiler options, tool versions etc.). This is easy to achieve by performing the build in a suitably prepared conda environment. However, conda does not yet provide a general method to query information about the current environment within `meta.yaml`. The present PR adds this capability. For example, let's say that installation of the toolset package places a template `toolset-info.yaml` in the environment's root directory. This template can now be loaded in `meta.yaml` via\r\n```yaml\r\n{% import 'CONDA_ENVIRONMENT/toolset-info.yaml' as toolset %}\r\n```\r\nand later be accessed via `{{ toolset.name }}`.\r\n\r\n[At present, templates must be located in either `<conda_root>/Lib/site-packages/conda_build/templates` or `RECIPE_DIR`, which won't serve the above use case.]\r\n"},"comment":{"url":"https://api.github.com/repos/conda/conda-build/issues/comments/138678377","html_url":"https://github.com/conda/conda-build/pull/575#issuecomment-138678377","issue_url":"https://api.github.com/repos/conda/conda-build/issues/575","id":138678377,"user":{"login":"asmeurer","id":71486,"avatar_url":"https://avatars.githubusercontent.com/u/71486?v=3","gravatar_id":"","url":"https://api.github.com/users/asmeurer","html_url":"https://github.com/asmeurer","followers_url":"https://api.github.com/users/asmeurer/followers","following_url":"https://api.github.com/users/asmeurer/following{/other_user}","gists_url":"https://api.github.com/users/asmeurer/gists{/gist_id}","starred_url":"https://api.github.com/users/asmeurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmeurer/subscriptions","organizations_url":"https://api.github.com/users/asmeurer/orgs","repos_url":"https://api.github.com/users/asmeurer/repos","events_url":"https://api.github.com/users/asmeurer/events{/privacy}","received_events_url":"https://api.github.com/users/asmeurer/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T19:36:17Z","updated_at":"2015-09-08T19:36:17Z","body":"This is not how I would solve this problem, but since you are going all in with the jinja2 templating and this makes things easier for you, it seems fine to me. "}}