jenkins-bot has submitted this change and it was merged.

Change subject: Appveyor Python 2.6 and 64bit builds
......................................................................


Appveyor Python 2.6 and 64bit builds

Use Appveyor accessories from python-appveyor-demo.

Also use generate_user_files and powershell to avoid
encoding and line ending issues between cmd and python 2.6.

Change-Id: I0f2ce5243f7be4b23ed917e29daee314e56988c6
---
M .appveyor.yml
1 file changed, 66 insertions(+), 15 deletions(-)

Approvals:
  John Vandenberg: Looks good to me, but someone else must approve
  XZise: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.appveyor.yml b/.appveyor.yml
index 9286aec..14af966 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,48 +1,99 @@
 environment:
 
   global:
+    APPVEYOR_PYTHON_URL: 
"https://raw.githubusercontent.com/ogrisel/python-appveyor-demo/master/appveyor/";
+
     # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
     # /E:ON and /V:ON options are not enabled in the batch script intepreter
     # See: http://stackoverflow.com/a/13751649/163740
-    WITH_COMPILER: "cmd /E:ON /V:ON /C run_with_compiler.cmd"
+    CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
+
     PYWIKIBOT2_DIR: "%appdata%\\Pywikibot"
+    PYWIKIBOT2_USER_CONFIG: "%appdata%\\Pywikibot\\user-config.py"
 
   matrix:
+
+    # Pywikibot support matrix suggests 'should run' on Python 2.6.5+
+    # Test the lowest release of each major Python version.
+
+    # Only Python 2.6.6 is able to be set up on Appveyor.
+    # https://github.com/ogrisel/python-appveyor-demo/issues/10
+    # fwiw, Redhat Enterprise Linux ships with 2.6.6.
+
+    - PYTHON: "C:\\Python266-x64"
+      PYTHON_VERSION: "2.6.6"
+      PYTHON_ARCH: "64"
+
+    # Python 2.7.0 needs "2.7" as the version instead of "2.7.0"
+    # https://github.com/ogrisel/python-appveyor-demo/issues/9
+
+    - PYTHON: "C:\\Python270-x64"
+      PYTHON_VERSION: "2.7"
+      PYTHON_ARCH: "64"
+
+    - PYTHON: "C:\\Python330-x64"
+      PYTHON_VERSION: "3.3.0"
+      PYTHON_ARCH: "64"
+
+    - PYTHON: "C:\\Python340-x64"
+      PYTHON_VERSION: "3.4.0"
+      PYTHON_ARCH: "64"
+
+    # Appveyor pre-installs these versions onto build machines
+
     - PYTHON: "C:\\Python27"
-      PYTHON_VERSION: "2.7.8"
+      PYTHON_VERSION: "2.7.x" # currently 2.7.9
       PYTHON_ARCH: "32"
 
     - PYTHON: "C:\\Python33"
-      PYTHON_VERSION: "3.3.5"
+      PYTHON_VERSION: "3.3.x" # currently 3.3.5
       PYTHON_ARCH: "32"
 
     - PYTHON: "C:\\Python34"
-      PYTHON_VERSION: "3.4.1"
+      PYTHON_VERSION: "3.4.x" # currently 3.4.3
       PYTHON_ARCH: "32"
+
+    - PYTHON: "C:\\Python27-x64"
+      PYTHON_VERSION: "2.7.x" # currently 2.7.9
+      PYTHON_ARCH: "64"
+
+    - PYTHON: "C:\\Python33-x64"
+      PYTHON_VERSION: "3.3.x" # currently 3.3.5
+      PYTHON_ARCH: "64"
+
+    - PYTHON: "C:\\Python34-x64"
+      PYTHON_VERSION: "3.4.x" # currently 3.4.3
+      PYTHON_ARCH: "64"
 
 init:
   - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
+  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
 
 install:
   - git submodule update --init
-  - ps: (new-object 
net.webclient).DownloadFile('https://raw.githubusercontent.com/pypa/python-packaging-user-guide/master/source/code/install.ps1',
 'install.ps1')
-  - "powershell install.ps1"
-  - ps: (new-object 
net.webclient).DownloadFile('https://raw.githubusercontent.com/pypa/python-packaging-user-guide/master/source/code/run_with_compiler.cmd',
 'run_with_compiler.cmd')
+  # Download the Appveyor Python build accessories into subdirectory .\appveyor
+  - mkdir appveyor
+  - ps: $wc = new-object net.webclient
+  - ps: $run = $wc.DownloadString($env:APPVEYOR_PYTHON_URL + 
'run_with_env.cmd')
+  - ps: $run | Out-File -Encoding ascii -FilePath appveyor\run_with_env.cmd
+
+  # This is needed for Python versions not installed on Appveyor build machines
+  - ps: if (-not(Test-Path($env:PYTHON))) { iex 
$wc.DownloadString($env:APPVEYOR_PYTHON_URL + 'install.ps1') }
+  - pip install unittest2==0.8
+  - pip install requests
 
 build: off
 
 test_script:
   - chcp 65001
-  - mkdir "%PYWIKIBOT2_DIR%"
-  - echo mylang = 'en' > "%PYWIKIBOT2_DIR%\\user-config.py"
-  - echo family = 'wikipedia' >> "%PYWIKIBOT2_DIR%\\user-config.py"
-  - echo max_retries = 2 >> "%PYWIKIBOT2_DIR%\\user-config.py"
-  - echo maximum_GET_length = 5000 >> "%PYWIKIBOT2_DIR%\\user-config.py"
-  - echo console_encoding = 'utf8' >> "%PYWIKIBOT2_DIR%\\user-config.py"
-  - echo transliteration_target = None >> "%PYWIKIBOT2_DIR%\\user-config.py"
+  - set PYTHONIOENCODING=utf8
+
+  - "mkdir %PYWIKIBOT2_DIR%"
+  - "python -Werror::UserWarning -m generate_user_files -dir:%PYWIKIBOT2_DIR% 
-family:wikipedia -lang:en -v -debug"
+  - ps: "[IO.File]::AppendAllText($env:PYWIKIBOT2_USER_CONFIG, 'max_retries = 
2; maximum_GET_length = 5000; transliteration_target = None;')"
 
   - set PYSETUP_TEST_NO_UI=1
-  - "%WITH_COMPILER% %PYTHON%\\python setup.py test"
+  - "%CMD_IN_ENV% python setup.py test"
 
 artifacts:
   - path: dist\*

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f2ce5243f7be4b23ed917e29daee314e56988c6
Gerrit-PatchSet: 9
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to