(Moved from pypa/pip#6744)
I realize this is something similar to, but not exactly the same as PEP 582.
This proposal is more about distribution than it is about packaging. I’m not sure why we don’t have a separate channel for distribution.
A typical python development workflow involves creating a virtualenv, and then using pip to install dependencies @ the site-packages of the virutalenv.
This proposal should allow users to move any installed package (from virtualenv) to a folder of their choice.
What’s the problem this feature will solve?
Allow users to package their dependencies in a zipfile, or some other format while ensuring that dependencies are the exact ones they were using in development.
This would also ensure that minor modifications made to the dependencies, using the code editor (presumably, using goto definition), are preserved in production. (without the need to create a separate private repository, or submit a pull request to the original author – both of which are quite tedious tasks.)
Current Solutions
The current standard way is to use --target
for storing dependencies in a folder, and then packaging them into a zip for distribution. (using tools like PEX/shiv/zipapp)
While sufficient for most trivial tasks, I personally experienced some problems with this approach, that I think this proposal can solve.
- The dependencies may not be the exact ones that were being used in development.
-
--target
doesn’t behave well with--editable
- It re-installs dependencies, which consumes unnecessary resources, for files that in theory, already exist on the user’s machine.
I don’t have much to say about the implementation details for this proposal, but it seems doable to me.
I’m willing to pitch in the hours myself if someone experienced is willing show me the starting point.
If this requires too much work or is technically impossible with the current architecture, I’m sorry for wasting your time.