Skip to content
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

Clean after updating with git. #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvaled
Copy link
Contributor

@mvaled mvaled commented May 29, 2017

If the repo your working with removes a python module, mr.developer leaved .pyc files behind. This may hurt your ability to test that other modules are properly updated (by not importing the removed module).

If the repo your working with removes a python module, mr.developer leaved
.pycs behind.  This may hurt your ability to test that other modules are
properly updated (by not importing the removed module).
@fschulze
Copy link
Owner

I think this is a bad idea. The options you use remove all untracked files. It might make sense when always-checkout is set to force, but I'm not sure of that either. Adding -- *.pyc to the options might be fine.

@mvaled
Copy link
Contributor Author

mvaled commented Jun 1, 2017

Yes. It would make more sense when always-checkout is set to force. My use case is for deployments: I have some packages which are not published in the PyPI (nor we keep an internal one, cause the overhead of maintaining would be of no benefit). Development .cfg files have always-checkout=no, but production development conf files do have it set to force.

In any case, we can also put another option: clear-after-update it could be either: no, all or a pattern passed to git clean. What do you think?

@mauritsvanrees
Copy link
Collaborator

Removing pyc files would be okay, the rest not.

I don't really consider it the job of mr.developer to handle this. It is more an unfortunate side effect of how git and Python work.

A practical approach outside or mr.developer would be to add a buildout part that does a cleanup in the checkouts. I have a remove-cruft script that I sometimes run to cleanup old pyc/pyo files:

#! /bin/sh
find . -name '*.pyc' -o -name '*.pyo' -o -name '*~' | xargs rm

@mvaled
Copy link
Contributor Author

mvaled commented Jun 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants