Copy an installed package to a specified directory
See original GitHub issueA 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.)
Alternative Solutions
The current standard way is to use --target
for storing dependencies in a folder, and then packaging them into a zipfile for distribution.
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. If this requires too much work or is technically impossible, I’m sorry for wasting your time.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Moved to discuss.python.org#2012. Thanks for the counsel.
If you want to check for potentially interested folks, they’ll likely be on https://discuss.python.org/c/packaging.
But really you (or someone else) will have to champion this if you want to see this happen. Which means doing the grunt work of figuring out what to do and how to do it.