
(Sending to the list this time.) On 2020 Jun 26, at 15:43, David Mathog <dmathog@gmail.com> wrote:
So by what method could code working outside of python possibly determine that "yaml" goes with "PyYAML"?
By checking all *.dist-info/RECORD files to see which one mentions the "yaml" directory. (top_level.txt could also be checked, but I believe that only setuptools creates this file — projects built with flit or poetry don't have it — and it's not very helpful when namespace packages are involved.)
Is this a common situation?
It happens whenever the project "foo" distributes a module named something other than "foo". Other projects like this that I can think of off the top of my head are BeautifulSoup4 (module: bs4), python-dateutil (module: dateutil), and attrs (module: attr).
Is pkg_resources actually a package?
pkg_resources is a module distributed by the setuptools project (alongside the modules "setuptools" and "easy_install").
Does it make sense for a common package repository to have a single instance of this directory or should each installed python based program retain its own version of this?
There should be one instance per each version of setuptools stored in the repository. -- John Wodder