Skip to content

Fix tox configuration #11362

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

Merged
merged 2 commits into from
Jun 5, 2018
Merged

Fix tox configuration #11362

merged 2 commits into from
Jun 5, 2018

Conversation

pganssle
Copy link
Member

@pganssle pganssle commented Jun 1, 2018

PR Summary

Currently tox will delete the font cache in ~/.matplotlib if invoked. Likely the tests should not be relying on or using anything from ~/.matplotlib, much less modifying the user's environment. This PR sets MPLCONFIGDIR to a temporary directory created by tox that is cleared on every invocation.

I was unable to test it because of #11361, and because tox is not invoked anywhere as part of the CI as far as I can tell.

Update
Closes #11361. With help from @anntzer, these changes now also fix the problem with running tox.

@pganssle pganssle changed the title Switch tox to using custom configuration directory Fix tox configuration Jun 1, 2018
@dstansby dstansby added this to the v3.0 milestone Jun 1, 2018
setenv =
MPLCONFIGDIR={envtmpdir}/.matplotlib
PIP_USER = 0
PIP_ISOLATED = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure you really want to set PIP_ISOLATED? This would also ignore whatever proxies are set in the config file (actually you are the one who raised that point :-))
The thing with PIP_USER=0 is that it's actually absolutely necessary to override --user to make tox work at all, whereas other settings may not need being overridden.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, dropping that bit.

Co-authored-by: Antony Lee <anntzer.lee@gmail.com>
Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly an improvement (from not working to working :))

@phobson phobson merged commit 427a981 into matplotlib:master Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tox.ini does not work out of the box
4 participants