bin/pybuild.py may conflict with pybuild module
Final issue when trying to get Portmod installed nicely on my server. Basically Gentoo puts scripts installed via setup.py in a /usr/lib/python-exec directory, with a wrapper script to actually execute them. However since python-exec is also in the python path (and is actually earlier), when loading the pybuild module it actually loads the bin/pybuild.py file.
The pybuild module was separate from the portmod module to keep the code decoupled and to make it easy to weed out packages that are importing portmod code within pybuilds (not generally a desired behaviour). It also allows us to use pybuild/init.py as an interface for pybuilds, while portmod/init.py can be an interface for any third-party software that wants to make use of portmod functionality.
A possible solution to this could be to move the pybuild module to portmod.pybuild, with the current portmod.pybuild file containing the pybuild interface moving elsewhere. This would also require changing the import path of the pybuilds in the repo.