From bc5f9a3e8bfa5acb301f9a7cdabeb4acac040c9c Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 3 Jul 2017 21:51:39 +0100 Subject: [PATCH] add pypy to appveyor --- appveyor.yml | 25 +++++++++++++++++++------ winbuild/appveyor_install_pypy.cmd | 3 +++ winbuild/build.py | 7 ++++++- winbuild/config.py | 1 + 4 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 winbuild/appveyor_install_pypy.cmd diff --git a/appveyor.yml b/appveyor.yml index 31ef3b048..18c179983 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,14 @@ init: environment: X64_EXT: -x64 + EXECUTABLE: python.exe + PIP_DIR: Scripts + VENV: NO matrix: + - PYTHON: C:/vp/pypy2 + EXECUTABLE: bin/pypy.exe + PIP_DIR: bin + VENV: YES - PYTHON: C:/Python27-x64 - PYTHON: C:/Python34 - PYTHON: C:/Python27 @@ -15,6 +22,7 @@ environment: - PYTHON: C:/Python33 - PYTHON: C:/Python33-x64 + install: - curl -fsSL -o pillow-depends.zip https://github.com/python-pillow/pillow-depends/archive/master.zip - 7z x pillow-depends.zip -oc:\ @@ -23,19 +31,24 @@ install: - xcopy c:\pillow-depends\*.tar.gz c:\pillow\winbuild\ - xcopy /s c:\pillow-depends\test_images\* c:\pillow\tests\images - cd c:\pillow\winbuild\ +- ps: | + if ($env:PYTHON -eq "c:/vp/pypy2") + { + c:\pillow\winbuild\appveyor_install_pypy.cmd + } - c:\python34\python.exe c:\pillow\winbuild\build_dep.py - c:\pillow\winbuild\build_deps.cmd build_script: -- '%PYTHON%\python.exe c:\pillow\winbuild\build.py' +- '%PYTHON%\%EXECUTABLE% c:\pillow\winbuild\build.py' - cd c:\pillow - dir dist\*.egg -- '%PYTHON%\python.exe selftest.py --installed' +- '%PYTHON%\%EXECUTABLE% selftest.py --installed' test_script: - cd c:\pillow -- '%PYTHON%\Scripts\pip.exe install nose' -- '%PYTHON%\python.exe test-installed.py -v -s' +- '%PYTHON%\%PIP_DIR%\pip.exe install nose' +- '%PYTHON%\%EXECUTABLE% test-installed.py -v -s' matrix: fast_finish: true @@ -47,9 +60,9 @@ artifacts: name: wheel after_test: - - '%PYTHON%\Scripts\pip.exe install wheel' + - '%PYTHON%\%PIP_DIR%\pip.exe install wheel' - cd c:\pillow\winbuild\ - - '%PYTHON%\python.exe c:\pillow\winbuild\build.py --wheel' + - '%PYTHON%\%EXECUTABLE% c:\pillow\winbuild\build.py --wheel' - cd c:\pillow - ps: Get-ChildItem .\dist\*.* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } diff --git a/winbuild/appveyor_install_pypy.cmd b/winbuild/appveyor_install_pypy.cmd new file mode 100644 index 000000000..39bf66782 --- /dev/null +++ b/winbuild/appveyor_install_pypy.cmd @@ -0,0 +1,3 @@ +curl -fsSL -o pypy2.zip https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.8.0-win32.zip +7z x pypy2.zip -oc:\ +c:\Python34\Scripts\virtualenv.exe -p c:\pypy2-v5.8.0-win32\pypy.exe c:\vp\pypy2 \ No newline at end of file diff --git a/winbuild/build.py b/winbuild/build.py index 99502938d..3d6c6e57f 100755 --- a/winbuild/build.py +++ b/winbuild/build.py @@ -72,6 +72,11 @@ def build_one(py_ver, compiler): args['python_path'] = "%PYTHON%" else: args['python_path'] = "%s%s\\Scripts" % (VIRT_BASE, py_ver) + + args['executable'] = "python.exe" + if 'EXECUTABLE' in os.environ: + args['executable'] = "%EXECUTABLE%" + args['py_ver'] = py_ver if '34' in py_ver: args['tcl_ver'] = '86' @@ -87,7 +92,7 @@ set INCLUDE=%%INCLUDE%%;%%INCLIB%%\%(inc_dir)s;%%INCLIB%%\tcl%(tcl_ver)s\include setlocal set LIB=%%LIB%%;C:\Python%(py_ver)s\tcl -call %(python_path)s\python.exe setup.py %%BLDOPT%% +call %(python_path)s\%(executable)s setup.py %%BLDOPT%% endlocal endlocal diff --git a/winbuild/config.py b/winbuild/config.py index 50f2cb4dd..c7a6fe675 100644 --- a/winbuild/config.py +++ b/winbuild/config.py @@ -5,6 +5,7 @@ PILLOW_DEPENDS_DIR = 'C:\\pillow-depends\\' pythons = { # '26': 7, '27': 7, + 'pypy2': 7, # '32': 7, '33': 7.1, '34': 7.1}