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

Command-line option for overriding toxworkdir #20

Closed
pytoxbot opened this Issue Sep 17, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@pytoxbot

pytoxbot commented Sep 17, 2016

In certain circumstances it would be very useful to override the setting of toxworkdir. For instance, in a CI environment such as Bamboo where each job of a build plan is run in it's own directory, it would be very useful to have toxworkdir point somewhere outside of the individual job directories in order to avoid repeated rebuilds of the virtual environments when the package list changes. Having toxworkdir be overridable means that the setting in tox.ini could be used as a default which is then overridden in the CI environment.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @witten

Not ideal, but here's a work-around:

toxworkdir={env:TOX_WORK_DIR:.tox}

A similar hack also works for envdir.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @aconrad

+1 to override this setting with an environment variable. Issue up-voted.

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by pi_byteorbit

Being able to override the default value with an environment variable would also be great.

My use case: I have one or two dozen projects checked out on my development machine, and their collection of {{{.tox}}} directories can grow pretty huge: many gigabytes, spread out over many directories. I would really like a way to be able to point them all at a common local place, outside of the individual project checkouts, to make them easier to manage.

At the moment, my workaround is to symlink {{{/.tox}}} to {{{~/.cache/tox/}}}: i have a small shell function helper to do this for new checkouts.

@obestwalter

This comment has been minimized.

Member

obestwalter commented Mar 17, 2017

Anyone opposed to closing this as wontfix? The issue is open since 2011 and we haven't been flooded with PRs for this, so the pain can't be too big :)

@xsteadfastx

This comment has been minimized.

xsteadfastx commented Nov 27, 2018

toxworkdir={env:TOX_WORK_DIR:.tox}

this is such a great workaround. thank you a thousand times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment