Skip to content
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

Travis "Python 3" environments really build with Python 2.7 #124

Closed
fghaas opened this issue Jan 12, 2016 · 2 comments
Closed

Travis "Python 3" environments really build with Python 2.7 #124

fghaas opened this issue Jan 12, 2016 · 2 comments

Comments

@fghaas
Copy link
Contributor

fghaas commented Jan 12, 2016

Case in point: https://travis-ci.org/django-oscar/django-oscar-paypal/jobs/101483297

That's a job that ostensibly runs in a Python 3.3 environment. From the build log:

$ export TOX_ENV=py33-django17-oscar10
0.00s$ source ~/virtualenv/python2.7/bin/activate
$ python --version
Python 2.7.9

That doesn't look right.

@fghaas
Copy link
Contributor Author

fghaas commented Jan 12, 2016

@maikhoepfel, while you're fixing test runs, you may want to look into this one as well.

We're using tox-travis for this; see hastexo/django-oscar-vat_moss@bb6c8a5. Slightly different approach, but at least it ensures that Python 3.3 and Python 3.4 envs do what it says on the tin.

@maiksprenger
Copy link
Member

@fghaas The Travis environment is indeed run with Python 2.7 if no version is specified. But tox creates individual virtual environments with the given Python version. Rest assured that they're run with the specified Python version. I just double-checked with updating my tox.ini to this:

[testenv]
commands = python --version

... which outputs Python 3 for the appropriate envs.

Thank you for the link to tox-travis. I prefer the simpler, albeit more verbose syntax over adding another library to learn about. But I'm sure it's useful in more complex projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants