Search for package refs using Python package names
Search for package refs using Python package names

Guild packages may be named with dashes, which are illegal Python
package characters. Guild package names are therefore converted to
safe Python package names where dashes are replaced with
underscored. A Guild package 'object-detect' would be renamed to
'object_detect' for the Python package.

This naming scheme is implemented in package_main, which is
responsible for generating the Python distribution. The result is that
references to Guild packages in Guild files that contain dashes will
not correspond to the installed Python packages.

This change assumes that dashes in package refs should be underscores
and makes the replacement during search. There should be no cases
where a Guild package on disk is not installed under a valid Python
package name.

guildai/guild,guildai/guild,guildai/guild,guildai/guild