-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis-setup.sh
executable file
·75 lines (65 loc) · 2.65 KB
/
.travis-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
sudo add-apt-repository -y ppa:pipelight/daily
sudo apt-get -qy update
sudo apt-get install -y wine-staging winbind
case "$WINEENV" in
py26)
VERSION=2.6.6
INSTALLER_URL="https://www.python.org/ftp/python/$VERSION/python-$VERSION.msi"
INSTALL_COMMAND="wine msiexec /i python-$VERSION.msi"
EXECDIR="$HOME/.wine/drive_c/Python26"
MORE_COMMANDS= # Crash: https://travis-ci.org/WineAsCI/python-lib-template/jobs/49725679#L1789
;;
py27)
VERSION=2.7.9
INSTALLER_URL="https://www.python.org/ftp/python/$VERSION/python-$VERSION.msi"
INSTALL_COMMAND="wine msiexec /i python-$VERSION.msi"
EXECDIR="$HOME/.wine/drive_c/Python27"
MORE_COMMANDS='wget http://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi; wine msiexec /i VCForPython27.msi'
;;
py33)
VERSION=3.3.5
INSTALLER_URL="https://www.python.org/ftp/python/$VERSION/python-$VERSION.msi"
INSTALL_COMMAND="wine msiexec /i python-$VERSION.msi"
EXECDIR="$HOME/.wine/drive_c/Python33"
MORE_COMMANDS= # Needs VC++ 10.0
;;
py34)
VERSION=3.4.2
INSTALLER_URL="https://www.python.org/ftp/python/$VERSION/python-$VERSION.msi"
INSTALL_COMMAND="wine msiexec /i python-$VERSION.msi"
EXECDIR="$HOME/.wine/drive_c/Python34"
MORE_COMMANDS= # Needs VC++ 10.0
;;
pypy)
VERSION=2.5.0
INSTALLER_URL="https://bitbucket.org/pypy/pypy/downloads/pypy-$VERSION-win32.zip"
INSTALL_COMMAND="unzip pypy-$VERSION-win32.zip"
EXECDIR="$PWD/pypy-$VERSION-win32"
PYTHON="$EXECDIR/pypy.exe"
PIP="$EXECDIR/bin/pip.exe"
EASY_INSTALL="$EXECDIR/bin/easy_install.exe"
;;
*)
echo "WINEENV $WINEENV not supported."
exit 1
esac
[[ -z "$PYTHON" ]] && PYTHON="$EXECDIR/python.exe"
[[ -z "$EASY_INSTALL" ]] && EASY_INSTALL="$EXECDIR/Scripts/easy_install.exe"
[[ -z "$PIP" ]] && PIP="$EXECDIR/Scripts/pip.exe"
export PATH="/opt/wine-staging/bin:$PATH"
WINEARCH=win32 wineboot
wget http://winetricks.org/winetricks
chmod +x winetricks
./winetricks nocrashdialog
#wget http://www.orbitals.com/programs/py.exe
wget $INSTALLER_URL
eval $INSTALL_COMMAND
sed -i 's/_windows_cert_stores = .*/_windows_cert_stores = ("ROOT",)/' "$EXECDIR/Lib/ssl.py"
eval $MORE_COMMANDS
echo "/opt/wine-staging/bin/wine $PYTHON" '$@' > _python
echo "/opt/wine-staging/bin/wine $EASY_INSTALL" '$@' > _easy_install
echo "/opt/wine-staging/bin/wine $PIP" '$@' > _pip
chmod +x _python _easy_install _pip
wget https://bootstrap.pypa.io/ez_setup.py -O - | ./_python
./_easy_install pip