Cleaning up PIL.

This commit is contained in:
Samuel Clay 2013-06-21 13:11:54 -07:00
parent a38d73a3f3
commit bb95ea8984
5 changed files with 14 additions and 7 deletions

View file

@ -9,7 +9,7 @@ import struct
import operator import operator
import gzip import gzip
import datetime import datetime
from PIL import BmpImagePlugin, PngImagePlugin, Image import BmpImagePlugin, PngImagePlugin, Image
from boto.s3.key import Key from boto.s3.key import Key
from StringIO import StringIO from StringIO import StringIO
from django.conf import settings from django.conf import settings

8
fabfile.py vendored
View file

@ -245,8 +245,12 @@ def setup_task(queue=None, skip_common=False):
def setup_installs(): def setup_installs():
sudo('apt-get -y update') sudo('apt-get -y update')
sudo('apt-get -y upgrade') sudo('apt-get -y upgrade')
sudo('apt-get -y install build-essential gcc scons libreadline-dev sysstat iotop git python-dev locate python-software-properties software-properties-common libpcre3-dev libncurses5-dev libdbd-pg-perl libssl-dev make pgbouncer python-setuptools python-psycopg2 libyaml-0-2 python-yaml python-numpy python-scipy python-imaging curl monit ufw') sudo('apt-get -y install build-essential gcc scons libreadline-dev sysstat iotop git python-dev locate python-software-properties software-properties-common libpcre3-dev libncurses5-dev libdbd-pg-perl libssl-dev make pgbouncer python-setuptools python-psycopg2 libyaml-0-2 python-yaml python-numpy python-scipy python-imaging curl monit ufw libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev')
sudo("ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib")
sudo("ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib")
sudo("ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib")
# sudo('add-apt-repository ppa:pitti/postgresql') # sudo('add-apt-repository ppa:pitti/postgresql')
sudo('apt-get -y update') sudo('apt-get -y update')
# run('curl -O http://peak.telecommunity.com/dist/ez_setup.py') # run('curl -O http://peak.telecommunity.com/dist/ez_setup.py')

View file

@ -36,6 +36,9 @@ from mongoengine import connect
from boto.s3.connection import S3Connection from boto.s3.connection import S3Connection
from utils import jammit from utils import jammit
import PIL.Image
sys.modules['Image'] = PIL.Image
# =================== # ===================
# = Server Settings = # = Server Settings =
# =================== # ===================

View file

@ -1,4 +1,4 @@
from PIL import Image import Image
import scipy import scipy
import scipy.cluster import scipy.cluster
from pprint import pprint from pprint import pprint

View file

@ -1,8 +1,8 @@
"""Operations for images through the PIL.""" """Operations for images through the PIL."""
from PIL import Image import Image
from PIL import ImageOps as PILOps import ImageOps as PILOps
from PIL.ExifTags import TAGS from ExifTags import TAGS
from StringIO import StringIO from StringIO import StringIO
PROFILE_PICTURE_SIZES = { PROFILE_PICTURE_SIZES = {