8000 Testing python 2.6, 2.7, and 3.2 by msabramo · Pull Request #948 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Testing python 2.6, 2.7, and 3.2 #948

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 4 commits into from
Jun 27, 2012
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add .travis.yml for Travis CI (http://travis-ci.org/)
  • Loading branch information
msabramo committed Jun 13, 2012
commit 94e61b069f4681fab00e1c740b9561b78eb53369
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: python

python:
- 2.6
- 2.7
- 3.1
- 3.2

install:
- pip install --use-mirrors nose numpy
- if [[ $TRAVIS_PYTHON_VERSION == '2.'* ]]; then pip install --use-mirrors PIL; fi
Copy link
Member

Choose a reason for hiding this comment

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

These two lines are my biggest concern. Presumably this is so that the CI server has the appropriate setup, but what happens is PIL & numpy already exist on the server?

Can you easily test with different versions of numpy?

Copy link
Member

Choose a reason for hiding this comment

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

pip install doesn't reinstall packages without the --upgrade option.

Copy link
Member

Choose a reason for hiding this comment

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

I didn't have enough exposure to pip to have confidence, so thanks for the clarification.

Note: For clarification, I read what you said to mean "even if the original install wasn't done by pip, no re-installation will be done".

Copy link
Member

Choose a reason for hiding this comment

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

Yes -- that's my understanding of how it works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, this is for Travis and Travis starts with a completely clean environment every time it runs. Basically you have a fresh new VirtualBox VM sandbox for each build.

- python setup.py install

script:
- mkdir ../foo
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice if we could have a better folder name. Presumably this is done to have somewhere to store the result images?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IIRC, that foo folder is simply so that we're not in the source directory because then Python 3 will import modules from there which have not been transformed by 2to3. Will definitely take ideas for better folder names or a better approach.

Copy link
Member

Choose a reason for hiding this comment

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

So pwd is the root of the repository, but if your in the root of the repository, when importing matplotlib via python3, you would actually be importing the source rather than the built version?
Perhaps it would be better to run python setup.py build which will make a clean build/lib* directory, or is it advised by travis to actually install the code that is being tested?

At the very least, this mkdir should have a comment to explain the reasoning, and perhaps rename the folder to test_results (I don't have much feeling for a good folder name either).

- cd ../foo
- python ../matplotlib/tests.py
0