Skip to content

Commit 7273bec

Browse files
committed
Merge pull request #594 from alancutter/allowPIL
Explicitly allow PIL to be installed from external sources.
2 parents a482c71 + 4e496ed commit 7273bec

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

tools/python/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ selenium
77
# Requirements for using -x
88
pyvirtualdisplay
99
pyscreenshot
10+
--allow-external=PIL
11+
--allow-unverified=PIL
1012
PIL

tools/python/setup.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,22 @@ fi
3939

4040
source bin/activate
4141

42-
# Check if the dependencies are installed
43-
pip install --no-download -r requirements.txt > /dev/null 2>&1
44-
if [ $? -ne 0 ]; then
45-
# Install dependencies
46-
pip install -r requirements.txt --upgrade
42+
function ensureRequirementsMet() {
43+
# Check if installed
44+
pip install --no-download $@ > /dev/null 2>&1
4745
if [ $? -ne 0 ]; then
48-
cat <<EOF
49-
Unable to install the required dependencies. Please see error output above.
46+
# Install dependencies
47+
pip install --upgrade $@
48+
if [ $? -ne 0 ]; then
49+
cat <<EOF
50+
Unable to install dependencies. Please see error output above.
5051
EOF
51-
exit 1
52+
exit 1
53+
fi
5254
fi
53-
fi
55+
}
56+
57+
ensureRequirementsMet 'pip>=1.5'
58+
ensureRequirementsMet -r requirements.txt
5459

5560
cd $OLD_PWD

0 commit comments

Comments
 (0)