From 50f1b8a852edf09f3339633a8ad3f991693bd7bf Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 11:49:51 +0000 Subject: [PATCH 01/10] MAINT: run tests + coverage under wine on travis-ci. --- .travis.yml | 5 ++--- scripts/run_tests_wine.sh | 10 ++++++++++ scripts/setup_tests_wine.sh | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 scripts/run_tests_wine.sh create mode 100644 scripts/setup_tests_wine.sh diff --git a/.travis.yml b/.travis.yml index 671d03b..2d88a6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,7 @@ before_install: install: - sudo apt-get install wine - - wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi - - wine msiexec /i python-2.7.6.msi + - sh scripts/setup_tests_wine.sh script: - - echo "Ok" + - sh scripts/run_tests_wine.sh diff --git a/scripts/run_tests_wine.sh b/scripts/run_tests_wine.sh new file mode 100644 index 0000000..a5fd53c --- /dev/null +++ b/scripts/run_tests_wine.sh @@ -0,0 +1,10 @@ +#! /bin/sh +set -e + +PYTHON="c:/Python27/python.exe" +COVERAGE="c:/Python27/Scripts/coverage.exe" + +wine ${PYTHON} -m nose.core mini_pywin32 +wine ${COVERAGE} erase +wine ${COVERAGE} run -m nose.core mini_pywin32 +wine ${COVERAGE} report --include=mini_pywin32* diff --git a/scripts/setup_tests_wine.sh b/scripts/setup_tests_wine.sh new file mode 100644 index 0000000..c2ceb34 --- /dev/null +++ b/scripts/setup_tests_wine.sh @@ -0,0 +1,14 @@ +#! /bin/sh +set -e + +PYTHON="c:/Python27/python.exe" +EASY_INSTALL="c:/Python27/Scripts/easy_install.exe" +PIP="c:/Python27/Scripts/pip.exe" + +wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py +wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi +wine msiexec /i python-2.7.6.msi + +wine ${PYTHON} ez_setup.py +wine ${EASY_INSTALL} pip +wine ${PIP} nose coverage From ae8ec88dbcd1693b114f23bf110d78ab64f91b11 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 11:55:06 +0000 Subject: [PATCH 02/10] MAINT: try running wine through XVFB. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2d88a6b..fcd6df1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ python: before_install: - sudo apt-get update + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" install: - sudo apt-get install wine From 088e7679994e4921ebf06fd7dc0c5e317a45349d Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 20:55:36 +0000 Subject: [PATCH 03/10] MAINT: tweak travis-ci script to make wine work with Xvfb. --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fcd6df1..f90bbef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,9 @@ before_install: install: - sudo apt-get install wine - - sh scripts/setup_tests_wine.sh + - wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi + - DISPLAY=:99.0 wine msiexec /i python-2.7.6.msi script: - - sh scripts/run_tests_wine.sh + - echo "Ok" + # - sh scripts/run_tests_wine.sh From d8cc4eb9e04dd2874ccaaaf414e33ad2e3d21981 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 20:59:28 +0000 Subject: [PATCH 04/10] MAINT: ensure python msi is installed unattended. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f90bbef..508a97f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ before_install: install: - sudo apt-get install wine - wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi - - DISPLAY=:99.0 wine msiexec /i python-2.7.6.msi + - DISPLAY=:99.0 wine msiexec /i python-2.7.6.msi /qn script: - echo "Ok" From f9040f1bd2728f947c504c28458c2bf0e00f01ea Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 21:03:49 +0000 Subject: [PATCH 05/10] MAINT: install test dependencies. --- .travis.yml | 3 +-- scripts/setup_tests_wine.sh | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 508a97f..27a8eea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,7 @@ before_install: install: - sudo apt-get install wine - - wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi - - DISPLAY=:99.0 wine msiexec /i python-2.7.6.msi /qn + - sh scripts/setup_tests_wine.sh script: - echo "Ok" diff --git a/scripts/setup_tests_wine.sh b/scripts/setup_tests_wine.sh index c2ceb34..7dee4f8 100644 --- a/scripts/setup_tests_wine.sh +++ b/scripts/setup_tests_wine.sh @@ -1,13 +1,15 @@ #! /bin/sh set -e +export DISPLAY=":99.0" + PYTHON="c:/Python27/python.exe" EASY_INSTALL="c:/Python27/Scripts/easy_install.exe" PIP="c:/Python27/Scripts/pip.exe" wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi -wine msiexec /i python-2.7.6.msi +wine msiexec /i python-2.7.6.msi /qn wine ${PYTHON} ez_setup.py wine ${EASY_INSTALL} pip From 564085d1400b9009c8ac05cdede7633c0af8eafc Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 21:19:52 +0000 Subject: [PATCH 06/10] MAINT: attempt at working around wine bug with ez_setup.py. --- scripts/setup_tests_wine.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/setup_tests_wine.sh b/scripts/setup_tests_wine.sh index 7dee4f8..f0dd42c 100644 --- a/scripts/setup_tests_wine.sh +++ b/scripts/setup_tests_wine.sh @@ -1,16 +1,17 @@ #! /bin/sh set -e -export DISPLAY=":99.0" +export DISPLAY=:99.0 PYTHON="c:/Python27/python.exe" EASY_INSTALL="c:/Python27/Scripts/easy_install.exe" PIP="c:/Python27/Scripts/pip.exe" -wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py wget http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi wine msiexec /i python-2.7.6.msi /qn -wine ${PYTHON} ez_setup.py -wine ${EASY_INSTALL} pip -wine ${PIP} nose coverage +wget https://pypi.python.org/packages/source/s/setuptools/setuptools-2.2.tar.gz +tar xf setuptools-2.2.tar.gz +(cd setuptools-2.2 && wine ${PYTHON} setup.py install) + +wine ${EASY_INSTALL} nose coverage From 42830a1d7402545ca75d79ca1c13abb7be8e7143 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 21:28:34 +0000 Subject: [PATCH 07/10] MAINT: hoping that a newer version of wine fixes the setuptools crash. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 27a8eea..0a4dc0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: - "2.7" before_install: + - sudo add-apt-repository ppa:ubuntu-wine/ppa - sudo apt-get update - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" From d9d236126c6ebaf848a88c931381ca64a596786a Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 21:36:03 +0000 Subject: [PATCH 08/10] MAINT: unattended setup of wine ppa. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0a4dc0d..c7b6214 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ python: - "2.7" before_install: - - sudo add-apt-repository ppa:ubuntu-wine/ppa + - sudo add-apt-repository ppa:ubuntu-wine/ppa -y - sudo apt-get update - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" From 8fa6050677794a4958a1e8f49c3ec0a5eea1a372 Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 21:41:05 +0000 Subject: [PATCH 09/10] MAINT: finally enabling actual tests on travis-ci. --- .travis.yml | 3 +-- scripts/run_tests_wine.sh | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c7b6214..303bfa7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,5 +14,4 @@ install: - sh scripts/setup_tests_wine.sh script: - - echo "Ok" - # - sh scripts/run_tests_wine.sh + - sh scripts/run_tests_wine.sh diff --git a/scripts/run_tests_wine.sh b/scripts/run_tests_wine.sh index a5fd53c..6fad866 100644 --- a/scripts/run_tests_wine.sh +++ b/scripts/run_tests_wine.sh @@ -1,6 +1,8 @@ #! /bin/sh set -e +export DISPLAY=:99.0 + PYTHON="c:/Python27/python.exe" COVERAGE="c:/Python27/Scripts/coverage.exe" From 2ae2a3bee502f1eab8129adf49d6903bcb22670d Mon Sep 17 00:00:00 2001 From: David Cournapeau Date: Wed, 12 Feb 2014 21:49:36 +0000 Subject: [PATCH 10/10] MAINT: install pywin32. --- scripts/setup_tests_wine.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/setup_tests_wine.sh b/scripts/setup_tests_wine.sh index f0dd42c..8a1b8d8 100644 --- a/scripts/setup_tests_wine.sh +++ b/scripts/setup_tests_wine.sh @@ -15,3 +15,7 @@ tar xf setuptools-2.2.tar.gz (cd setuptools-2.2 && wine ${PYTHON} setup.py install) wine ${EASY_INSTALL} nose coverage + +wget http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/pywin32-218.win32-py2.7.exe/download -O pywin32-218.win32-py2.7.exe + +wine ${EASY_INSTALL} pywin32-218.win32-py2.7.exe