[buildout]
parts =

[macro.pythonpath.eggs]
recipe = slapos.recipe.build
init =
  self.eggs = [e.strip() for e in options['eggs'].splitlines() if e.strip()]
update =
  from zc.buildout.easy_install import working_set
  buildout = self.buildout['buildout']
  eggs_directory = buildout['eggs-directory']
  develop_eggs_directory = buildout['develop-eggs-directory']
  dists = working_set(self.eggs, [develop_eggs_directory, eggs_directory])
  paths = ':'.join(dist.location for dist in dists)
  self.buildout[options['environment']]['PYTHONPATH'] = paths
  print("PYTHONPATH=" + paths)
