upm icon indicating copy to clipboard operation
upm copied to clipboard

python package guesser should understand direct vs transitive dependencies

Open turbio opened this issue 5 years ago • 2 comments

the map (https://github.com/replit/upm/blob/master/internal/backends/python/pypi_packages.json) we're using for python's package guesser includes modules from transitive dependencies in the same set as those directly provided. We should build a better mapping which includes both transitive and direct modules.

Transitive modules should only be used to determine which modules are already satisfied by the existing packages. When guessing we should only use modules directly from the package.

turbio avatar Sep 07 '19 02:09 turbio

If you don't mind me asking, how is the map generated?

remram44 avatar May 01 '21 16:05 remram44

Good question @remram44, It's pretty crazy! We have an internal script which creates a fresh python environment, installs a specific package, then inspects the available python modules. This is then run for every single package in pypi to generate the json mapping file.

turbio avatar May 04 '21 23:05 turbio