Fix tox version issue on trusty #66

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Owner

johnsca commented May 2, 2016

No description provided.

+tox_prereqs:
+ifneq ($(TOX_GT_1_8),true)
+ @echo "Pip installing tox"
+ sudo apt-get install -y python-pip && sudo pip install -U 'tox>=1.8'
@marcoceppi

marcoceppi May 2, 2016

Owner

Noooooooooooo do not pip install on my machine

@johnsca

johnsca May 2, 2016

Owner

Run it in the charmbox like you're supposed to. ;)

@marcoceppi

marcoceppi May 2, 2016

Owner

no, that is not a standard workflow, and until we get charm test to properly containerize runs we shouldn't just stomp on people's machines

@johnsca

johnsca May 2, 2016

Owner

But in all seriousness, it's already installing via pip if tox isn't available. The reason it's failing in charmbox is because the apt version of tox for trusty is really old. Creating a venv to install tox so that it can then create another venv seems overly complicated and unnecessary.

@johnsca

johnsca May 2, 2016

Owner

Very many tests assume sudo powers and apt-get or pip install things. Tests are containerized already using charmbox which is what this is assuming. Maybe we should just fix charmbox instead, but then we'd still already have the pip behavior that's in there currently.

@marcoceppi

marcoceppi May 2, 2016

Owner

could we just, for now, install to --user? even though I'd prefer a virtualenv for tox. If I run the Makefile in this layer, it's only going to flake and charm proof, and unit tests. None of these should run scripts that do a sudo install, so your argument that because tests do this should don't follow through.

@johnsca

johnsca May 2, 2016

Owner

I'm inclined to remove the tox dependency management from the layer entirely and fix the issue in charmbox, since that's our standard env for running tests and it is expected to manage most of the dependencies, of which the correct version of tox is one.

I'm going to close this PR and we'll open on against charmbox, and we can revisit removing the dep management from this layer entirely later.

@johnsca johnsca closed this May 2, 2016

@galgalesh galgalesh deleted the tox-fix branch Nov 8, 2017

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