What's the problem this feature will solve?
Currently, pkg_resources, setuptools and setuptools._distutils all have their own _vendor directories. In many cases, the vendored packages overlap — especially packaging is now vendored 3 times. Besides potential version mismatches such as #4323, it also increases the disk space use and wheel size. From a quick and dirty deduplication attempt, compressed wheel goes down from 920 KiB to 710 KiB, and the install from 3.5 MiB to 2.7 MiB.
Describe the solution you'd like
I think it would make sense to establish some kind of reuse hierarchy, and e.g. given that setuptools imports stuff from pkg_resources anyway, make them reuse the vendored packages from pkg_resources as well, and only vendor these that aren't common to both.
Alternative Solutions
No response
Additional context
No response
Code of Conduct
What's the problem this feature will solve?
Currently,
pkg_resources,setuptoolsandsetuptools._distutilsall have their own_vendordirectories. In many cases, the vendored packages overlap — especiallypackagingis now vendored 3 times. Besides potential version mismatches such as #4323, it also increases the disk space use and wheel size. From a quick and dirty deduplication attempt, compressed wheel goes down from 920 KiB to 710 KiB, and the install from 3.5 MiB to 2.7 MiB.Describe the solution you'd like
I think it would make sense to establish some kind of reuse hierarchy, and e.g. given that
setuptoolsimports stuff frompkg_resourcesanyway, make them reuse the vendored packages frompkg_resourcesas well, and only vendor these that aren't common to both.Alternative Solutions
No response
Additional context
No response
Code of Conduct