Nodes and Tables.Packages.PkgSet.get_sorted_buildenvs
Documentation
Dependency sort the packages and then return a list of build environments for each package.