-
-
Notifications
You must be signed in to change notification settings - Fork 533
Use $XDG_CACHE_HOME by default for distshare #535
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
Conversation
@@ -19,7 +19,7 @@ List of optional global options:: | |||
toxworkdir=path # tox working directory, defaults to {toxinidir}/.tox | |||
setupdir=path # defaults to {toxinidir} | |||
distdir=path # defaults to {toxworkdir}/dist | |||
distshare=path # (DEPRECATED) defaults to {homedir}/.tox/distshare | |||
distshare=path # (DEPRECATED) defaults to $XDG_CACHE_HOME/tox/distshare |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the docs say: this feature is deprecated, so why should we put extra work into this - or is the deprecation deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea about the feature, but its default has been updated due to how the PR works. I wanted the documentation to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jleclanche thanks for the PR anyway, but I am really not sure if this makes sense at all to touch, as the distshare option in tox as such is marked deprecated - so I will leave this PR hang around for now and wait until we made a decision in. #346
@@ -19,7 +19,7 @@ List of optional global options:: | |||
toxworkdir=path # tox working directory, defaults to {toxinidir}/.tox | |||
setupdir=path # defaults to {toxinidir} | |||
distdir=path # defaults to {toxworkdir}/dist | |||
distshare=path # (DEPRECATED) defaults to {homedir}/.tox/distshare | |||
distshare=path # (DEPRECATED) defaults to $XDG_CACHE_HOME/tox/distshare |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... or am I missing something?
My understanding is that it's the distshare config option that is deprecated, not the concept of a distshare. |
That might well be - I simply don't know, as I don't use that feature, I'll dig around a bit. |
In the CHANGELOG it also looks like distshare as such is deprecated:
There is not much about it - looks like the original use case was for Jenkins to share builds between different runs, and the only other mention is in tips and tricks, so I guess this is really deprecated. Maybe someone else can shed some light on this ... |
I find that as far as personal usage goes, tox does a bit of a poor job in caching wheels and updating venvs when the requirements update (eg. on travis, caching the .tox directory is a huge speedup, but then causes build failures when the requirements are updated). As far as distshare goes, I think it should at the very least be disabled by default if tox no longer cares about it and it's truly deprecated. |
That's what I am trying to find out now. I personally don't care about it (at least not until now), but I don't know why it's deprecated either.
If you look around in the issues a bit, you'll find out that you are not the only one who noticed that and that there are several efforts to improve that. |
copying in and copying out artifacts (i.e. Python packages). | ||
By default, the distshare directory is located in | ||
``$XDG_CACHE_HOME/tox/distshare``, where ``$XDG_CACHE_HOME`` defaults to | ||
``{homedir}`` if not set. This directory will be used for copying in and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be {homedir}/.cache/
@jleclanche I Won't merge this for this release as #346 is actually not clarified yet, if understand it correctly (windows behaviour). Also @merwok suggested a fix that has not been integerated yet. For 2.8 there is more than enough already, so this will hopefully go into 2.9 once it's clarified. |
Closes #346
https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
This defaults distshare to $XDG_CACHE_HOME. Per the spec, if that variable is not defined, $HOME/cache is used (os.path.expanduser("~") is windows-compatible as well). All this removes extraneous clutter in $HOME.
CONTRIBUTORS
;