-
Notifications
You must be signed in to change notification settings - Fork 49
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
Make the disk_usage() function work on macOS #537
Conversation
Fixes the issue described at conda-incubator#507 (comment) I don't know yet what should be done on Windows. Windows support will need to be investigated separately. It will likely be a lot more work than macOS support.
@asmeurer looks like there are some formatting issues. As a side note I wonder if we are trying to achieve cross platform support. Would it make sense for us to use libraries that have already implemented this? E.g. psutil might be a heavier dependency. Seem that psutil support filesystem https://psutil.readthedocs.io/en/latest/index.html?highlight=disk%20usage#psutil.disk_usage. But reading those docs it looks like they also recommend |
Yes, I saw
vs.
I wonder if the usage in orm.py is intended to be this or not? I'm not sure if psutil has a There are also some subtleties around things like apparent size vs. disk usage. This function uses apparent size and I've maintained that on Mac with the |
conda-docker doesn't work on Mac, and making it work is not straightforward, so for now we just disable it when we aren't on Linux. With this and conda-incubator#537, basic Mac support seems to work with --standalone (conda-incubator#507). I'm not sure what else I should be testing, but I can create environments and they appear to be functional.
@asmeurer you are totally right. I was confusing disk usage and directory usage. LGTM! |
Also I just want to point out that at a cursory glance most of the solutions in that StackOverflow question are wrong because they don't account for hard links, which is especially important for conda environments. du does handle hard links correctly. |
Fixes the issue described at
#507 (comment)
I don't know yet what should be done on Windows. Windows support will need to be investigated separately. It will likely be a lot more work than macOS support.
Fixes # .
Description
This pull request:
Pull request checklist
Additional information