Pip 2020-12-04
I searched through pip's source code enough that I've worked out approximately what needs to change. I'll probably run up against something horrible, but we'll see.
Anyway, I should make sure I know about the use cases so I can make sure that things work:
- Redirect installation of a package to a fork hosted on a website. (Useful for projects with common overrides, but many environments that may not need everything installed.)
- Redirect installation of a package to a local file (I'm not sure if people besides me do this)
- Run pip freeze against an environment. Use the result as a constraint file when recreating it. This means that the packages installed in the recreated environment will be a subset of the original environment (provided the project didn't add requirements), but if the project has dropped some requirements, it will be a smaller subset. This workflow requires URL constraints because pip freeze will output URL requirements, if applicable. (In any case, this works out to controlling the evolution of a project over time.)
To be honest, my use case is probably the weakest, since it works out to "basically a devpi index with less steps". But I think all of these use cases require the same basic functionality, so it works out.
Anyway, I should probably do a broader survey of use cases before moving on, just to make sure I'm not missing something.
Good night.