pypa / pipfile

Other
3.24k stars 145 forks source link

Link additional Pipfiles from root one #122

Open filips123 opened 4 years ago

filips123 commented 4 years ago

It should be possible to link additional Pipfiles from the root one, and install dependencies from all files at once.


Even if one of Pipfile benefits is that you can have one file instead of multiple requirements.txt files, there are still some cases where you would want multiple separate files.

For example, you may want to have some completely separated functionality in separate folder, which would require its own dependencies. Then root Pipfile would specify something like "load additional/Pipfile if exists" which will them automatically install that additional dependencies. This would be useful for some kind of program plugin functionallyty, as plugins could just be a folders with Pipfile, and their dependencies would be automatically installed when the plugin folders will be present.


So, there should be a few types of loading this. Here, I will just provide examples, but without any real syntax that would be used.

First two should be just classic "load path/to/Pipfile" and "load path/to/Pipfile if it exists". So, first one should fail if file does not exst and second one should not.

Next should be some more advenced loading like "load plugins//Pipfile" and "load path/to/Pipfile". So, wildcart should be handled correctly to install dependencies in all pathes that match.

And the third is quite similar to second one, so they could probably be implemented/used together. This would be support classic regexes when loading patches. So you could have "load plugins/[^disabled-]*/Pipfile" which would load all "plugins" which aren't disabled (so without disabled- prefix).