-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add --overwrite-existing option that overwrites existing files #216
Conversation
f15c6bc
to
f718daf
Compare
(I originally made this comment on the attached issue, but meant to make it here)
|
That's a much better name, thanks. Changed it in 829b483. |
Not needed - update the destination instance instead. |
Oh nevermind, I see that I'll be able to set it on the dest. destination = SchemeDictionaryDestination(..., overwrite_existing=True)
installer.install(
source=wheel_source,
destination=destination,
additional_metadata={"INSTALLER": "me"},
overwrite_existing=True, # New
) Sorry for the noise! |
Is there anything that I can do to help get this merged? I'm looking forward to being able to use this in https://github.com/bazelbuild/rules_python |
Echoing @dougthor42, is there anything I can do to have this merged and eventually released? Thanks! |
@carlsmedstad please rebase your changes and ping me once it's ready and I will review |
Implement the --force option that, if supplied, will make installer overwrite any already existing package files instead of failing. With this flag, installer can be used in an idempotent manner, i.e. the same command can be executed multiple times with the same result: python -m installer --force --destdir=tmp dist/*.whl python -m installer --force --destdir=tmp dist/*.whl python -m installer --force --destdir=tmp dist/*.whl
829b483
to
365d341
Compare
@Secrus Thank you! Rebase done. |
Let me know if you'd like me to squash the commits. |
Took a stab at implementing what I suggested in #215.
Implement the
--force
option that, if supplied, will make installer overwrite any already existing package files instead of failing. With this flag, installer can be used in an idempotent manner, i.e. the same command can be executed multiple times with the same result:One other candidate for the option name I have in mind is
--overwrite
which I think is more mechanically descriptive, but it might be less ubiquitous, as tools likemv
andcp
use-f/--force
.Resolves #215