Factor out sidebar entry construction
This makes it possible to reuse this logic in other modules as well,
preventing code duplication. While at it, move additional_sidebar
merging before the other entries (additional entries should go first,
since the other entries are mostly dev-only etc).
Patch by: Sverre Rabbelier
import os, sys
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
import pkg_resources
pkg_resources.require('WebOb')