quaint-telephone-89068
12/15/2022, 1:28 AM./pants dependencies --transitive provides only the direct 3rd party dependencies in a pants target format, however the full information is present in the lock file.
Describe the solution you'd like
I believe this functionality can be split into two enhancements to the dependencies goal:
• an additional flag to show reqs transitive reqs
• an additional flag to format this output in in a requirements.txt syntax. I see adjacent work is being done in #17721 with groundwork completed in 20b3710
I would be interested in helping contribute this functionality.
Describe alternatives you've considered
My current alternative is synthesize such a requirements.text file manually by `pex lock export`ing on the complete lock file, then removing unrelated items.
Though for components with pex targets running the built pex via PEX_INTERPRETER=1 and then running this snippet is quicker:
import pkg_resources
installed_packages = pkg_resources.working_set
installed_packages_list = sorted(["%s==%s" % (i.key, i.version)
for i in installed_packages])
print(installed_packages_list)
pantsbuild/pantsuser
12/28/2022, 4:12 PM