[buildout]
develop =
    .
    ../jinja2-trunk
    ../pwt.recipe.closurebuilder

parts =
# libraries and 3rd party
    closure-library
# command line interface
    cli
# files
    deps.js
    compiled_tests.js
# commands
    shell
    python
    serve
    test
# documentation
    sphinxbuilder

unzip = true

[closure-library]
recipe = infrae.subversion
urls = http://closure-library.googlecode.com/svn/trunk@1083 closure-library
ignore_verification = true

[cli]
recipe = zc.recipe.egg
eggs = pwt.jinja2js

[deps.js]
recipe = pwt.jinja2js:dependency
output = src/pwt/jinja2js/media/deps.js
root_with_prefix =
    ${closure-library:location}/closure-library /closure
    src/pwt/jinja2js/media /media
    src/pwt/jinja2js/templates /soy
extension = soy

# Describe how to find and compile any dependent templates
packages = pwt.jinja2js

autoescape = autoescaped.soy

[compiled_tests.js]
recipe = pwt.recipe.closurebuilder:compile
dependency = deps.js
output = src/pwt/jinja2js/media/compiled

inputs = src/pwt/jinja2js/media/tests.js

flags =
    --compilation_level=ADVANCED_OPTIMIZATIONS

[shell]
recipe = zc.recipe.egg
scripts = ipython=shell
eggs =
    pwt.jinja2js
    ipython

[python]
recipe = zc.recipe.egg
interpreter = python
eggs =
    pwt.jinja2js
    setuptools-git

[settings.ini]
recipe = z3c.recipe.filetemplate
files = etc/settings.ini

[serve]
recipe = zc.recipe.egg
scripts = paster=serve
arguments =
    args = ["serve", "${settings.ini:files}"] + sys.argv[1:]
eggs =
    pwt.jinja2js
    PasteScript

[test]
recipe = zc.recipe.egg
scripts = nosetests=test
arguments =
    argv = sys.argv[0:1]
    +
    ["--nocapture",
     "--nologcapture",
     "--exe",
     "--with-test-suites",
     "--test-suites-include=jinja2.testsuite.suite",
     "--test-suites-include=pwt.recipe.closurebuilder.tests.suite",
    ] + sys.argv[1:]
eggs =
    nose
    pwt.jinja2js [test]

[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/docs-sources
build = ${buildout:directory}/docs
