Source

blockdiag / buildout.cfg

Full commit
[buildout]
parts = blockdiag test coverage

develop = .

[blockdiag]
recipe = zc.recipe.egg
eggs = blockdiag
interpreter = py

[test]
recipe = pbp.recipe.noserunner
eggs =
    blockdiag[test]
    coverage
    unittest-xml-reporting

[coverage]
recipe = zc.recipe.egg
eggs = coverage

[test-extra]
recipe = iw.recipe.cmd:py
on_install = true
cmds =
   >>> url = "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fvlgothic%2F46966%2FVLGothic-20100416.zip"
   >>> buildout_dir = buildout.get('directory', '.')
   >>> path = os.path.join(buildout_dir, 'src/blockdiag/tests/truetype')
   >>> if not os.path.exists(path):
   ...     os.makedirs(path)
   ...     import cStringIO, urllib2, zipfile
   ...     archive = urllib2.urlopen(url).read()
   ...     zip = zipfile.ZipFile(cStringIO.StringIO(archive))
   ...     ttf = zip.read('VLGothic/VL-PGothic-Regular.ttf')
   ...     open(os.path.join(path, 'VL-PGothic-Regular.ttf'), 'wb').write(ttf)