Skip to content

Explicitly allow PIL to be installed from external sources. #594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tools/python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ selenium
# Requirements for using -x
pyvirtualdisplay
pyscreenshot
--allow-external=PIL
--allow-unverified=PIL
PIL
23 changes: 14 additions & 9 deletions tools/python/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,22 @@ fi

source bin/activate

# Check if the dependencies are installed
pip install --no-download -r requirements.txt > /dev/null 2>&1
if [ $? -ne 0 ]; then
# Install dependencies
pip install -r requirements.txt --upgrade
function ensureRequirementsMet() {
# Check if installed
pip install --no-download $@ > /dev/null 2>&1
if [ $? -ne 0 ]; then
cat <<EOF
Unable to install the required dependencies. Please see error output above.
# Install dependencies
pip install --upgrade $@
if [ $? -ne 0 ]; then
cat <<EOF
Unable to install dependencies. Please see error output above.
EOF
exit 1
exit 1
fi
fi
fi
}

ensureRequirementsMet 'pip>=1.5'
ensureRequirementsMet -r requirements.txt

cd $OLD_PWD