blob: 242adbda829afd64724f00c06d1ece60855819ae (
plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
#!/bin/bash
set -e
set -x
if [[ "$(uname -s)" == 'Darwin' ]]; then
DARWIN=true
else
DARWIN=false
fi
if [[ "$DARWIN" = true ]]; then
brew update
if [[ "${OPENSSL}" == "0.9.8" ]]; then
brew upgrade openssl
if which pyenv > /dev/null; then
eval "$(pyenv init -)"
fi
case "${TOX_ENV}" in
py26)
curl -O https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
;;
py27)
curl -O https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
py32)
brew upgrade pyenv
pyenv install 3.2.6
pyenv global 3.2.6
;;
py33)
brew upgrade pyenv
pyenv install 3.3.6
pyenv global 3.3.6
;;
py34)
brew upgrade pyenv
pyenv install 3.4.2
pyenv global 3.4.2
;;
py3pep8)
sudo apt-get install python3.3 python3.3-dev
;;
pypy)
brew upgrade pyenv
pyenv install pypy-2.4.0
pyenv global pypy-2.4.0
;;
docs)
curl -O https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
;;
esac
pvenv rehash
else
sudo add-apt-repository ppa:fkrull/deadsnakes
if [[ "${TOX_ENV}" == "pypy" ]]; then
sudo add-apt-repository ppa:pypy/ppa
fi
if [[ "${OPENSSL}" == "0.9.8" ]]; then
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ lucid main"
sudo apt-get update
if [[ "${OPENSSL}" == "0.9.8" ]]; then
sudo apt-get install --force-yes libssl-dev/lucid
case "${TOX_ENV}" in
py26)
sudo apt-get install python2.6 python2.6-dev
;;
py32)
sudo apt-get install python3.2 python3.2-dev
;;
py33)
sudo apt-get install python3.3 python3.3-dev
;;
py34)
sudo apt-get install python3.4 python3.4-dev
;;
py3pep8)
sudo apt-get install python3.3 python3.3-dev
;;
pypy)
sudo apt-get install --force-yes pypy pypy-dev
;;
docs)
sudo apt-get install libenchant-dev
;;
esac
fi
sudo pip install virtualenv
virtualenv ~/.venv
source ~/.venv/bin/activate
pip install tox coveralls
|