generate a deep tree of dependencies for cortex package