From 1f3fc0b8ae7141755f1a28ad5b74069c66a67706 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Thu, 7 Apr 2016 10:21:13 +0300 Subject: [PATCH 1/7] appveyor.yml Build dist --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 39ee1f5cf..ab459132f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,6 +19,8 @@ install: - c:\python34\python.exe c:\pillow\winbuild\build_dep.py - c:\pillow\winbuild\build_deps.cmd build_script: +- '%PYTHON%\Scripts\pip.exe install wheel' +- '%PYTHON%\python.exe c:\pillow\winbuild\build.py --dist' - '%PYTHON%\python.exe c:\pillow\winbuild\build.py' - cd c:\pillow - dir dist\*.egg From 6be40f54ba1c74ed7d6da7d3034ee6fea4710185 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Thu, 7 Apr 2016 10:35:31 +0300 Subject: [PATCH 2/7] Remove unneeded getopt dependency --- winbuild/build.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/winbuild/build.py b/winbuild/build.py index bdede470a..85fc6c041 100644 --- a/winbuild/build.py +++ b/winbuild/build.py @@ -3,7 +3,6 @@ import subprocess import shutil import sys -import getopt import os from config import * @@ -139,14 +138,12 @@ def run_one(op): if __name__ == '__main__': - opts, args = getopt.getopt(sys.argv[1:], '', ['clean', 'dist']) - opts = dict(opts) - - if '--clean' in opts: + args = sys.argv[1:] + if '--clean' in args: clean() op = 'install' - if '--dist' in opts: + if '--dist' in args: op = "bdist_wininst --user-access-control=auto" if 'PYTHON' in os.environ: From e93cb41c1bb5f3fc31e26c9309b20f0b494af7e5 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Thu, 7 Apr 2016 10:36:24 +0300 Subject: [PATCH 3/7] Explicit imports in builds scripts --- winbuild/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winbuild/build.py b/winbuild/build.py index 85fc6c041..f5143c507 100644 --- a/winbuild/build.py +++ b/winbuild/build.py @@ -5,7 +5,8 @@ import shutil import sys import os -from config import * +from config import compilers, pythons, compiler_fromEnv, pyversion_fromEnv +from config import VIRT_BASE, X64_EXT def setup_vms(): From cc0c9b2b0d085acb46a243fd8b68ffc254b62e74 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Thu, 7 Apr 2016 10:49:07 +0300 Subject: [PATCH 4/7] Remove unneded parameter wrapping in build script --- winbuild/build.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/winbuild/build.py b/winbuild/build.py index f5143c507..cec1b749f 100644 --- a/winbuild/build.py +++ b/winbuild/build.py @@ -23,8 +23,7 @@ def setup_vms(): return "\n".join(ret) -def run_script(params): - (version, script) = params +def run_script(version, script): try: print("Running %s" % version) filename = 'build_pillow_%s.cmd' % version @@ -99,7 +98,7 @@ def clean(): except: # could already be removed pass - run_script(('virtualenvs', setup_vms())) + run_script('virtualenvs', setup_vms()) def main(op): @@ -120,22 +119,21 @@ def main(op): 64)]), footer()]))) - results = map(run_script, scripts) + results = [run_script(pv, cv) for pv, cv in scripts] for (version, status, trace, err) in results: print("Compiled %s: %s" % (version, status and 'ERR' or 'OK')) def run_one(op): - compiler = compiler_fromEnv() py_version = pyversion_fromEnv() - run_script((py_version, + run_script(py_version, "\n".join([header(op), build_one(py_version, compiler), footer()]) - )) + ) if __name__ == '__main__': @@ -146,7 +144,6 @@ if __name__ == '__main__': op = 'install' if '--dist' in args: op = "bdist_wininst --user-access-control=auto" - if 'PYTHON' in os.environ: run_one(op) else: From ee8073ce127b09cb97477447106bd59ee2d84a0c Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Thu, 7 Apr 2016 10:56:44 +0300 Subject: [PATCH 5/7] Build wheels on Windows --- winbuild/build.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/winbuild/build.py b/winbuild/build.py index cec1b749f..7253779ff 100644 --- a/winbuild/build.py +++ b/winbuild/build.py @@ -136,15 +136,20 @@ def run_one(op): ) +def run(op): + if 'PYTHON' in os.environ: + run_one(op) + else: + main(op) + + if __name__ == '__main__': args = sys.argv[1:] if '--clean' in args: clean() - op = 'install' if '--dist' in args: - op = "bdist_wininst --user-access-control=auto" - if 'PYTHON' in os.environ: - run_one(op) + run('bdist_wininst --user-access-control=auto') + run('bdist_wheel') else: - main(op) + run('install') From 19a5d2084c486da83b0f3092d0bcfd6a0532ed54 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Thu, 7 Apr 2016 23:06:05 +0300 Subject: [PATCH 6/7] appveyor.yml Forgot artifact upload command --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index ab459132f..245595f11 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -25,6 +25,8 @@ build_script: - cd c:\pillow - dir dist\*.egg - '%PYTHON%\python.exe selftest.py --installed' +on_success: +- ps: Get-ChildItem .\dist\*.* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } test_script: - cd c:\pillow - '%PYTHON%\Scripts\pip.exe install nose' From 1fe49019258e371003b9f2f7e0e2fdc66f5cf135 Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Wed, 20 Apr 2016 00:55:29 +0300 Subject: [PATCH 7/7] Rebase and merge with .egg builder --- appveyor.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 245595f11..12645d604 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -18,15 +18,13 @@ install: - cd c:\pillow\winbuild\ - c:\python34\python.exe c:\pillow\winbuild\build_dep.py - c:\pillow\winbuild\build_deps.cmd -build_script: - '%PYTHON%\Scripts\pip.exe install wheel' +build_script: - '%PYTHON%\python.exe c:\pillow\winbuild\build.py --dist' - '%PYTHON%\python.exe c:\pillow\winbuild\build.py' - cd c:\pillow - dir dist\*.egg - '%PYTHON%\python.exe selftest.py --installed' -on_success: -- ps: Get-ChildItem .\dist\*.* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } test_script: - cd c:\pillow - '%PYTHON%\Scripts\pip.exe install nose' @@ -37,7 +35,7 @@ artifacts: - path: pillow\dist\*.egg name: build after_test: - - ps: Get-ChildItem .\dist\*.egg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } + - ps: Get-ChildItem .\dist\*.* | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } deploy: provider: S3 access_key_id: AKIAIRAXC62ZNTVQJMOQ @@ -46,4 +44,3 @@ deploy: bucket: pillow-nightly folder: win/$(APPVEYOR_BUILD_NUMBER)/ artifact: /.*egg/ -