debian/0000755000000000000000000000000012245666373007204 5ustar debian/docs0000644000000000000000000000002711700163427010041 0ustar README.rst .build/html debian/python-sorl-thumbnail.doc-base0000644000000000000000000000037111700163427015046 0ustar Document: python-sorl-thumbnail Title: sorl-thumbnail Documentation Author: Mikko Hellsing Section: Programming/Python Format: HTML Index: /usr/share/doc/python-sorl-thumbnail/html/index.html Files: /usr/share/doc/python-sorl-thumbnail/html/*.html debian/rules0000755000000000000000000000213011703556500010244 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh --with python2,sphinxdoc $@ .PHONY: override_dh_auto_build override_dh_auto_build: PYTHONPATH=.:$$PYTHONPATH sphinx-build -b html -d .build/.doctrees -N docs .build/html dh_auto_build chmod 644 sorl_thumbnail.egg-info/* .PHONY: override_dh_clean override_dh_clean: rm -rf .build dh_clean .PHONY: override_dh_auto_install override_dh_auto_install: dh_auto_install sed -i 's/Metadata-Version: 1\.0/Metadata-Version: 1\.1/' debian/python-sorl-thumbnail/usr/lib/python2.*/*-packages/sorl_thumbnail-*.egg-info/PKG-INFO .PHONY: override_dh_auto_test override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) mkdir -p tmp-locales localedef -i en_US -c -f UTF-8 tmp-locales/en_US.UTF-8 set -e; \ for python in $(shell pyversions -r); do \ for name in pil pgmagick imagemagick graphicsmagick; do \ LOCPATH=$(CURDIR)/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=tests LOCAL_BUILD=1 $$python tests/runtests.py --settings=settings.$$name ; \ done; \ done rm -rf tmp-locales endif debian/compat0000644000000000000000000000000211700163427010365 0ustar 7 debian/control0000644000000000000000000000350412245664323010602 0ustar Source: sorl-thumbnail Section: python Priority: optional Maintainer: Debian Python Modules Team Uploaders: Michael Fladischer Build-Depends: debhelper (>= 7.0.50~), graphicsmagick, imagemagick, locales, python-all, python-django, python-imaging, python-pgmagick, python-setuptools, python-sphinx (>= 1.0.7+dfsg) Standards-Version: 3.9.5 X-Python-Version: >= 2.7 Homepage: https://github.com/sorl/sorl-thumbnail Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/sorl-thumbnail/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/sorl-thumbnail/trunk/ Package: python-sorl-thumbnail Architecture: all Depends: python-django, python-imaging | python-pgmagick | imagemagick | graphicsmagick, ${misc:Depends}, ${python:Depends}, ${sphinxdoc:Depends} Suggests: python-redis Description: thumbnail support for the Django framework sorl-thumbnail provides a convenient way to create and manage image thumbnails in a Django project. It offers integration into several parts of Django like the admin system by showing thumbnails for ImageFields or through a ImageField that also takes care of deleting thumbnail files when the referencing object is removed. . Other features include: * Django storage support * Pluggable Engine support (PIL, pgmagick, ImageMagick or GraphicsMagick) * Pluggable Key Value Store support (Django cache, redis) * Pluggable Backend support (i.e. different thumbnail filename schema) * Dummy generation (placeholders) * Flexible, simple syntax, generates no html * CSS style cropping options * Margin calculation for vertical positioning debian/clean0000644000000000000000000000010511700163427010170 0ustar sorl_thumbnail.egg-info/PKG-INFO sorl_thumbnail.egg-info/SOURCES.txt debian/watch0000644000000000000000000000014411700163427010217 0ustar version=3 http://pypi.python.org/packages/source/s/sorl-thumbnail/sorl-thumbnail-([\d\.]+)\.tar\.gz debian/copyright0000644000000000000000000000353312245664323011134 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: sorl-thumbnail Upstream-Contact: Copyright (c) 2010, Mikko Hellsing Source: http://pypi.python.org/pypi/django-countries/ Files: * Copyright: 2010, Mikko Hellsing License: BSD-3-clause Files: debian/* Copyright: 2013, Michael Fladischer License: BSD-3-clause License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . * Neither the name of the sorl-thumbnail the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/patches/0000755000000000000000000000000012245666373010633 5ustar debian/patches/disable_http_tests.patch0000644000000000000000000000335411703556500015531 0ustar Description: Disable HTTP requests during build Remote resources such as images fetched over HTTP are not allowed at build time so this patch skips these tests if the environment variable LOCAL_BUILD is present. Author: Michael Fladischer Last-Update: 2012-01-12 Forwarded: not-needed --- a/tests/thumbnail_tests/tests.py +++ b/tests/thumbnail_tests/tests.py @@ -241,12 +241,13 @@ default.kvstore.get(im).serialize_storage(), 'thumbnail_tests.storage.TestStorage', ) - im = ImageFile('http://www.aino.se/media/i/logo.png') - default.kvstore.set(im) - self.assertEqual( - default.kvstore.get(im).serialize_storage(), - 'sorl.thumbnail.images.UrlStorage', - ) + if not os.environ.get('LOCAL_BUILD', False): + im = ImageFile('http://www.aino.se/media/i/logo.png') + default.kvstore.set(im) + self.assertEqual( + default.kvstore.get(im).serialize_storage(), + 'sorl.thumbnail.images.UrlStorage', + ) def test_abspath(self): item = Item.objects.get(image='500x500.jpg') @@ -355,10 +356,12 @@ except Exception: pass + @unittest.skipIf(os.environ.get('LOCAL_BUILD', False), "No remote resources desired") def testUrl(self): val = render_to_string('thumbnail3.html', {}).strip() self.assertEqual(val, '') + @unittest.skipIf(os.environ.get('LOCAL_BUILD', False), "No remote resources desired") def testPortrait(self): val = render_to_string('thumbnail4.html', { 'source': 'http://www.aino.se/media/i/logo.png', debian/patches/series0000644000000000000000000000012512245664323012037 0ustar disable_http_tests.patch fix_sphinx_warnings.patch orientation.patch django1.6.patch debian/patches/fix_sphinx_warnings.patch0000644000000000000000000000212011757144600015725 0ustar Description: Fix two minor errors in documentation Ther are two minoir typos in upstream documentation that lead to sphinx emitting warnings during build. This patch fixes both. Author: Michael Fladischer Last-Update: 2012-01-13 Forwarded: https://github.com/sorl/sorl-thumbnail/pull/80 --- a/docs/reference/settings.rst +++ b/docs/reference/settings.rst @@ -119,7 +119,7 @@ ``THUMBNAIL_IDENTIFY`` -===================== +====================== - Default ``'identify'`` --- a/docs/management.rst +++ b/docs/management.rst @@ -22,7 +22,7 @@ ``python manage.py thumbnail clear`` This totally empties the Key Value Store from all keys that start with the -:ref:`THUMBNAIL_KEY_PREFIX`. It does not delete any files. It is generally safe to +:ref:``THUMBNAIL_KEY_PREFIX``. It does not delete any files. It is generally safe to run this if you do not reference the generated thumbnails by name somewhere else in your code. The Key Value store will update when you hit the template tags, and if the thumbnails still exist they will be used and not overwritten. debian/patches/django1.6.patch0000644000000000000000000000206412245664323013336 0ustar Description: Fix FTBFS with Django 1.6 Upstream uses some deprecated functions from Django. Author: Sebastian Ramacher Author: Michael Fladischer Last-Update: 2013-11-24 --- a/tests/settings/default.py +++ b/tests/settings/default.py @@ -32,3 +32,4 @@ "django.core.context_processors.request", ) +SECRET_KEY = 'testkey' --- a/tests/thumbnail_tests/urls.py +++ b/tests/thumbnail_tests/urls.py @@ -1,12 +1,16 @@ -from django.conf.urls.defaults import * +from django.conf.urls import patterns from django.conf import settings +from django.views.generic import TemplateView +class DynamicTemplateView(TemplateView): + def get_template_names(self): + return self.kwargs['template'] urlpatterns = patterns('', (r'^media/(?P.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, 'show_indexes': True} ), - (r'^(.*\.html)$', 'django.views.generic.simple.direct_to_template'), + (r'^(?P