John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/291578

Change subject: Use specific varied versions of Python
......................................................................

Use specific varied versions of Python

Record the patch level of the Travis defaults,
and use the recently added capability of Travis
to install other versions on demand where possible.

Not available via Travis python versions:
- any other 2.6 except 2.6.9
- 2.7.0-2,4,5,7
- 3.3.0-2
- 3.4.0-1

Use pyenv to install 2.6.6 and 3.4.0

Change-Id: Ie87587dd8a841c9adeb9f74e35876bb3259fa89c
---
M .travis.yml
1 file changed, 28 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/78/291578/1

diff --git a/.travis.yml b/.travis.yml
index a0186ad..0348bc9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,11 +5,13 @@
 sudo: false
 
 python:
-  - '2.7'
-  - '3.3'
-  - '3.4'
-  - '3.5'
-  - '2.6'
+  # Python minor versions pre-installed by Travis, with default patch level
+  - '2.7.9'
+  - '3.3.5'
+  - '3.4.2'
+  - '2.6.9'
+  # Installed on demand
+  - '3.5.1'
 
 # OSX builds do not yet support Python
 os: linux
@@ -24,6 +26,14 @@
       - liblua5.1-0-dev
 
 before_install:
+  # Use pyenv to install versions specified by $PYENV_VERSION
+  - |
+    git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
+    $PYENV_ROOT/bin/pyenv install --skip-existing "$PYENV_VERSION"
+    virtualenv --python="$PYENV_ROOT/versions/$PYENV_VERSION/bin/python" 
"$HOME/virtualenvs/$PYENV_VERSION"
+    source "$HOME/virtualenvs/$PYENV_VERSION/bin/activate"
+    python --version
+
   # When PYSETUP_TEST_EXTRAS is not enabled, do not allow the
   # default 'install' step to install all dependencies listed in
   # requirements.txt to verify that a minimal install works as expected.
@@ -126,7 +136,8 @@
     # the github repository 'wikimedia/pywikibot-core'.
     # See http://docs.travis-ci.com/user/encryption-keys/ for more information.
     - secure: 
kofInMlisiTBt9o/Ustc/vySlkKfxGzGCX2LwA1D2waym8sDTS0o5gMJ5LsrT/BUKwZbe1vLozPHqZrrkQvsdTml+DpZuotzdILs0m0f3BUoexEC6OON5IDljuxFyETrD1Ug44ih5Mc4lVFOdTcBzg501ZmswGwQrBvg/OyEFfE=
-    - TEST_TIMEOUT: 300
+    - TEST_TIMEOUT=300
+    - PYENV_ROOT=$HOME/.pyenv
 
   matrix:
     - LANGUAGE=en FAMILY=wikipedia PYWIKIBOT2_TEST_PROD_ONLY=1
@@ -134,6 +145,7 @@
 
 matrix:
   include:
+    # precise uses 2.7.3
     - python: '2.7_with_system_site_packages'  # equivalent to virtualenv: 
system_site_packages: true
       env: LANGUAGE=he FAMILY=wikivoyage DIST=precise-sudo 
PYWIKIBOT2_TEST_NO_RC=1
       dist: precise
@@ -145,6 +157,7 @@
             - graphviz
             - liblua5.1-0-dev
             - python-ipaddr
+      # trusty uses 2.7.6
     - python: '2.7_with_system_site_packages'
       env: LANGUAGE=nb FAMILY=wikipedia DIST=trusty PYSETUP_TEST_EXTRAS=1
       dist: trusty
@@ -156,24 +169,24 @@
             - graphviz
             - liblua5.1-0-dev
             - python-ipaddr
-    - python: '2.7'
+    - python: '2.7.8'
       env: LANGUAGE=en FAMILY=wpbeta SITE_ONLY=1 
OAUTH_DOMAIN="en.wikipedia.beta.wmflabs.org"
-    - python: '3.3'
+    - python: '3.3.3'
       env: LANGUAGE=zh FAMILY=wpbeta SITE_ONLY=1 
OAUTH_DOMAIN="zh.wikipedia.beta.wmflabs.org"
     - python: '3.4'
-      env: LANGUAGE=en FAMILY=wsbeta SITE_ONLY=1
-    - python: '2.7'
+      env: LANGUAGE=en FAMILY=wsbeta SITE_ONLY=1 PYENV_VERSION=3.4.0 
PYSETUP_TEST_EXTRAS=1
+    - python: '2.7.11'
       env: LANGUAGE=wikia FAMILY=wikia PYWIKIBOT2_TEST_NO_RC=1
-    - python: '3.3'
+    - python: '3.3.6'
       env: LANGUAGE=en FAMILY=musicbrainz SITE_ONLY=1
-    - python: '3.4'
+    - python: '3.4.4'
       env: LANGUAGE=test FAMILY=wikipedia SITE_ONLY=1 
OAUTH_DOMAIN="test.wikipedia.org"
-    - python: '3.4'
+    - python: '3.4.3'
       env: LANGUAGE=test FAMILY=wikidata SITE_ONLY=1
-    - python: '3.4'
+    - python: '3.5.0'
       env: LANGUAGE=ar FAMILY=wiktionary PYWIKIBOT2_TEST_NO_RC=1
     - python: '2.6'
-      env: LANGUAGE=wikidata FAMILY=wikidata SITE_ONLY=1
+      env: LANGUAGE=wikidata FAMILY=wikidata SITE_ONLY=1 PYENV_VERSION=2.6.6 
PYSETUP_TEST_EXTRAS=1
 
 notifications:
   email:

-- 
To view, visit https://gerrit.wikimedia.org/r/291578
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie87587dd8a841c9adeb9f74e35876bb3259fa89c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jay...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to