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

Remove data_files on uninstall #38

Closed
blink1073 opened this issue Jul 23, 2020 · 2 comments
Closed

Remove data_files on uninstall #38

blink1073 opened this issue Jul 23, 2020 · 2 comments

Comments

@blink1073
Copy link
Member

In #35 we added a develop_handler to handle data_files for a develop install.

Currently we do not remove data_files during an uninstall. uninstall is an option given to the develop target. We can use the presence of that option to remove those files.

@blink1073
Copy link
Member Author

I think we should release 1.0 after this is fixed.

@vidartf
Copy link
Collaborator

vidartf commented Dec 14, 2020

We can override the uninstall_link method to add the logic, but there isn't really a robust way to get a list of the files that were copied over during the develop step. Some "best-efforts" options could be:

  1. Run a build step during uninstall, and delete any files that would be included in from this.
  2. Add some data to the egg-info during the develop step, and remove them during the uninstall step.

Systemic problem cases:

  • If the filenames generated include a random or changing part (uuid, date, version, etc.), then 1. will fail to clean these up.
  • If the datafile spec or content changes, then 1. will fail to clean these up
  • If the package is develop installed into multiple environments, the egg-info might be incorrect for the current uninstall, so 2. might fail to clean up some files. I'm wondering if might be impossible to use a folder for multiple dev installs reliably though, so this might be declared as out of scope.
  • If the developer does a git clean -xdf, or otherwise deletes the egg-info folder, 2. will always fail.

Hopefully someone has a smarter idea or I'm missing an opportunity in the build system?

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

No branches or pull requests

2 participants