-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
Comments
Original comment by @witten Not ideal, but here's a work-around:
A similar hack also works for |
Original comment by @aconrad +1 to override this setting with an environment variable. Issue up-voted. |
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. |
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 :) |
this is such a great workaround. thank you a thousand times. |
I'd like to +1 this feature request. I've got a use-case where I'm running tests in a docker container - I want to mount the source code on the host machine and test it in the container, but I don't want to re-use the tox work dir of the host machine. I want the guest to have its own work dir. I'd like in the environment for |
I could have used this feature for #1706 also. Use-case: VM with host file system mounted. |
Sadly, this technique doesn't work when a
Perhaps it's a separate issue that |
This will be possible with the rewrite branch. |
@jaraco |
That worked. I'm going to add the workaround to all of my tox ini files. |
…version 3.1.0 Jason R. Coombs (36): Remove tox-venv and tox-pip-version. Tox-venv is discouraged (tox-dev/tox-venv#48 (comment)) and tox-pip-version was only there to support tox-venv. venv is dead; long live virtualenv. Remove more references to tox-venv Add workaround for warning emitted when junitxml is used. Ref pytest-dev/pytest#6178. Include mypy for type checking during tests. Ensure virtualenv is upgraded when installing tox. Fixes jaraco/path#188. Run tests on prereleases of Python on Windows. Fixes jaraco/skeleton#17. Add workaround for python/mypy#8627. Fixes jaraco/skeleton#18. Add 'refresh.svg' demonstrating an example of refreshing a project with the latest skeleton. Ref #7. Move workaround for python/mypy#8627 to tox.ini, as adding it to setup.cfg prevents releases to PyPI. Fixes jaraco/skeleton#19. Remove workaround for python/mypy#8627. Ref jaraco/skeleton#18. Create Github releases when releasing the package. Fixes jaraco/skeleton#23. Moved refresh.svg to another branch. Reference the animation from the docs. Ref jaraco/skeleton#7. Add the env var mapping too. Disable pytest-black and pytest-mypy on PyPy. Fixes jaraco/skeleton#22. Ref pytest-dev/pytest#7675. Bump black and blacken-docs to latest stable versions. Use enabled plugin configuration to enable mypy and black when the plugin is present. Ref jaraco/skeleton#22. Also enable flake8 and cov when the plugins are present. Fix mypy glitch on __path__. Add workflows for running tests. Ref jaraco/skeleton#24. Cut releases from Github Actions instead of Azure Pipelines. Ref jaraco/skeleton#24. Refresh docs to prefer Github Actions to Azure Pipelines. Ref jaraco/skeleton#24. Use RTD v2 config Test on Python 3.9. Skip 3.7 to avoid creating too many builds. Release on 3.9. Drop tests on Travis, Appveyor, and Azure Pipelines. use add-github-secrets, which infers the secrets needed from the github workflow. Use inline flags with local scope. Honor TOX_WORK_DIR if set. Workaround for tox-dev/tox#20. Fix badge Collapse skeleton history from archive/2020-12 Update skeleton description to describe the periodic collapse. Fixes #27. Enable automerge Add except_ decorator. Following move to Github actions, port the expected failing test also. 🧎♀️ Genuflect to the types. 🧎♀️ Genuflect to the types. Pass the GITHUB_ACTIONS
…21.7.0 Jason R. Coombs (12): Move Tidelift release note publishing to Github Actions. Honor TOX_WORK_DIR if set. Workaround for tox-dev/tox#20. Add a Dockerfile on Windows Fix rendering of README. Extract _detect_backend function. Collapse skeleton history from archive/2020-12 Update skeleton description to describe the periodic collapse. Fixes #27. Enable automerge Update changelog. Ref #480. Update readme to reflect more recent practices relying on Github Actions. Restore tests now that they're no longer failing. Fixes #436. Declare typing support. Fixes #437. Thomas Kluyver (1): Initialise backend on first use instead of on import
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.
The text was updated successfully, but these errors were encountered: