For example, instead of having a lot of AutoInstall.register calls in https://github.com/WebKit/WebKit/blob/main/Tools/Scripts/webkitpy/__init__.py, we'd have a AutoInstall.register_requirements(join(basename(__file__), "requirements.txt")) and all the requirements listed in the requirements.txt Once we're on GitHub, this will allow us to use tools such as dependabot to keep our requirements up-to-date, which will hopefully help us maintain support for the latest Python releases.
<rdar://problem/75962600>
pip-tools (https://github.com/jazzband/pip-tools) and pipfile (https://github.com/pypa/pipfile) could be helpful with regards to maintaining knowledge of what we actually depend on versus their dependencies, however both are really intended to be used in environment specific ways (both per platform and per Python version), which doesn't really suit us needing to know ahead of time all possible dependencies.
Since we won't be removing the current single-library-in-Python-code support, we could just keep our special cases in Python. I hope that as we drop Python 2 support, we will have less special cases to worry about.
Created attachment 429167 [details] Patch This is what I get from playing around with pip-tools, but this by no means suffices as it loses Python 2/3 variation and per-platform variation. That said, it does do some to split out our direct dependencies.