-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing issues with install's --target option. #2007
Conversation
1. Check for the existence of a directory before copying from temporary directory to final target. If it exists, warn the user. 2. If the user specifies the --upgrade option and the directory exists, delete it and continue with installation. 3. Adding tests for above cases. This resolves pypa#1489, pypa#1710 completely and parts of pypa#1833.
Looks nice, many thanks for this. |
Some issues:
If these can be fixed, that would be ideal. But they will be tricky to do so, and I'm not sure they are worth the bother. @dstufft, @qwcode, @jezdez any opinions on this? I'm tempted to say that the behaviour with this patch is better than the current behaviour, so let's go with it. I'm also tempted to raise a follow-up PR to omit the metadata directories for a |
Isn't introspecting with |
@webmaven I don't use namespace packages so I can't say. But it certainly could be. If you can check (delete the egg-info directories and see if things still work) that'd be great. |
UPDATE: OK, looks like neither are required, as long as the |
@webmaven Thanks. I'm not sure where the |
Those appear when you install a namespace package. In this case, installing repoze.lru puts |
Typical App Engine apps do not need the egg/dist-info files so maybe we can leave them out by default but with an option to include them? I just didn't want to add an option that only applied to For your third point, I think I can safely cover that case. I'm still somewhat new to python packaging internals and I forgot that packages could be just one file. |
@jonparrott I'm inclined to leave the |
Behavior is now to overwrite files or folders if --upgrade is specified, however, links will not be overwritten.
@pfmoore that's fine with me. Will having the older info files around hurt pkg resources? If so, I would prefer to exclude them all together (which is pretty easy). I've pushed a new commit to handle the case of single-module packages such as six. The reason I was skipping non-directories is because I didn't want to overwrite links. I've added a more appropriate check there and updated the tests to match. Is there anything else that needs to be done on this? |
Nope, I don't think so. I'd like to see if any of the other devs have feedback - I pinged them above - so I'll leave it a few days before merging. Many thanks for the contribution! |
No problem, always happy to help, and thank you for your guidance. App Engine developers will be super happy when this lands. I'll keep an eye out if the other devs have any other feedback for me here. |
Fixing issues with install's --target option.
No feedback, so I assume others are happy with this. Merged it. |
Thanks, @pfmoore! |
@pfmoore Curious as to when you guys are planning to release this patch as we'd like to inform the app engine community. If the answer is "when its done" that's fine. Thanks. |
It'll be released as part of pip 6.0, there's not a hard time line for that, but near future is likely. |
Thanks, @dstufft. |
@dstufft what is 'near future' in this context? A loose range would be fine as an answer. |
Likely more than a month, less than 6 months. That depends on time and such though. |
This resolves #1489, #1710 completely and parts of #1833.